Last active
July 30, 2016 14:16
-
-
Save simonewebdesign/5325630 to your computer and use it in GitHub Desktop.
bash loop through parameters
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
#!/bin/bash | |
# loop through parameters | |
for WORD; do | |
echo $WORD | |
done | |
# another way is: | |
for i in "$@" | |
do | |
echo "$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment