I just started writing shell scripts in Unix so, I am a total newbie
I want to read the arguments given when the user run the script ex:
sh script -a abc
I want to read for argument -a user gave abc.
My code so far:
if ( $1 = "-a" )
then var=$2
fi
echo $var
I get an error.
if [ $1 = "-a" ]