Save argument ${1} passed to a shell script in a variable within shell script
11,118
Simply try doing this :
myvar="$1"
echo "$myvar"
Author by
Rookie
Updated on June 05, 2022Comments
-
Rookie almost 2 years
I want to save
${1}
argument passed to my script (${1}
is a file path) into a string variable within the same shell script, and thenecho
the path usingecho variable
and notecho ${1}
.