Last active
August 29, 2015 13:56
-
-
Save odadoda/9273126 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for-each | |
MY_ARRAY=("one", "two", "three") | |
for i in MY_ARRAY ; do | |
echo $i | |
done | |
# extended for-loop | |
for (( i=0; i "-lt" 3; i++ )) ; do | |
echo $i | |
done | |
# or use seq command to generate the incrementet variable | |
for i in `seq 1 3` ; do echo $i ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment