Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash iterate over a variable range of numbers

#!/bin/bash
START=1
END=5
for i in $(eval echo "{$START..$END}")
do
	echo "$i"
done
Source by www.cyberciti.biz #
 
PREVIOUS NEXT
Tagged: #bash #iterate #variable #range #numbers
ADD COMMENT
Topic
Name
7+1 =