Created
March 15, 2019 10:28
-
-
Save carlessanagustin/9adcbeaabbbf5a6f9159cd6be623b4f3 to your computer and use it in GitHub Desktop.
Shell Variables
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
#!/usr/bin/env bash | |
echo "I was called with $# parameters" | |
echo "My name is: $0" | |
echo "All parameters are: $@" | |
echo "With @" | |
for var in "$@" | |
do | |
echo " Parameter: $var" | |
done | |
echo "With *" | |
for var in "$*" | |
do | |
echo " Parameter: $var" | |
done | |
echo "This contains the exit value of the last run command: $?" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment