Skip to content

Instantly share code, notes, and snippets.

@simonewebdesign
Last active July 30, 2016 14:16
Show Gist options
  • Save simonewebdesign/5325630 to your computer and use it in GitHub Desktop.
Save simonewebdesign/5325630 to your computer and use it in GitHub Desktop.
bash loop through parameters
#!/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