Created
July 15, 2022 08:24
-
-
Save radamhu/8f4cef6358ad10de5b42ea4623495179 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# source : https://www.howtogeek.com/442332/how-to-work-with-variables-in-bash/ | |
echo "There were $# command line parameters" | |
echo "They are: $@" | |
echo "Parameter 1 is: $1" | |
echo "The script is called: $0" | |
# any old process so that we can report on the exit status | |
pwd | |
echo "pwd returned $?" | |
echo "This script has Process ID $$" | |
echo "The script was started by $USER" | |
echo "It is running on $HOSTNAME" | |
sleep 3 | |
echo "It has been running for $SECONDS seconds" | |
echo "Random number: $RANDOM" | |
echo "This is line number $LINENO of the script" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment