Rookie Rookie - 1 year ago 57
Bash Question

Save argument ${1} passed to a shell script in a variable within shell script

I want to save

argument passed to my script (
is a file path) into a string variable within the same shell script, and then
the path using
echo variable
and not
echo ${1}

Answer Source

Simply try doing this :

echo "$myvar"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download