Created
February 16, 2021 17:41
-
-
Save josepsmartinez/1cf1a52f454a4fefed422ff58659b6d4 to your computer and use it in GitHub Desktop.
Iterate over arguments in bash
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 | |
# Reference: https://stackoverflow.com/a/3816747/4449273 | |
for arg in "$@"; do | |
echo $arg; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment