$0
name of the script (path included)<br>
$1
First parameter
Example:
touch parameters.sh
chmod 755 parameters.sh
(All permision for user, read and execute permission for the rest )
Script parameters.sh
#!/bin/bash/
# First parameter is assigned to variable USER_NAME
USER_NAME=$1
echo Hello $USER_NAME
echo $(date)
echo $(pwd)
# If the program execute sucessfully returns 0
exit 0
Usage: ./parameters.sh Peter
output: Hello Peter--date--current path
if [ cond1 ]
then
echo 'message1'
elif[ cond2 ]
then
echo 'message2'
else
echo 'message2'
fi