Created
December 3, 2010 18:50
-
-
Save asim/727360 to your computer and use it in GitHub Desktop.
integer for loops in bash
This file contains hidden or 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 i in {1..100}; do echo foo; done | |
for ((i=1; i<=100; i++)); do echo foo; done | |
for `seq 1 100`; do echo foo; done | |
# while version | |
i=1; while [ $i -le 100 ]; do echo foo; i=$(($i+1)); done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment