This commit is contained in:
Levi Bostian 2014-09-05 20:51:48 -05:00
parent 64c1ee391f
commit eefa3add63

View File

@ -8,6 +8,7 @@ contributors:
- ["Denis Arh", "https://github.com/darh"]
- ["akirahirose", "https://twitter.com/akirahirose"]
- ["Anton Strömkvist", "http://lutic.org/"]
- ["Rahil Momin", "https://github.com/iamrahil"]
filename: LearnBash.sh
---
@ -140,6 +141,12 @@ do
echo "$VARIABLE"
done
# Or write it the "traditional for loop" way:
for ((a=1; a <= 3; a++))
do
echo $a
done
# They can also be used to act on files..
# This will run the command 'cat' on file1 and file2
for VARIABLE in file1 file2