Created
June 3, 2020 21:01
-
-
Save NanoDano/b6c4348ea287d5dd8bda4ea124dc6206 to your computer and use it in GitHub Desktop.
Bash IF statement examples
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
| # Specific number of iterations | |
| for i in $(seq 1 10) | |
| do | |
| echo $i | |
| done | |
| # Specify list | |
| for x in test.txt misc.txt other.txt | |
| do | |
| rm $x | |
| done | |
| # Traditional for loop | |
| for (( c=1; c<=5; c++ )) | |
| do | |
| echo "hi" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment