Skip to content

Instantly share code, notes, and snippets.

@josepsmartinez
Created February 16, 2021 17:41
Show Gist options
  • Save josepsmartinez/1cf1a52f454a4fefed422ff58659b6d4 to your computer and use it in GitHub Desktop.
Save josepsmartinez/1cf1a52f454a4fefed422ff58659b6d4 to your computer and use it in GitHub Desktop.
Iterate over arguments in bash
#!/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