I am trying to assign the command line parameters to a variable (Entire argument to one variable) in shell script but it is not working Here is what I tried:
str1 ='$*'
str1 ="$*"
set str1 =$*
set str1 ="$*"
set str1 ='(echo $*)'
set str1 ='$*'
I am trying to assign the command line parameters to a variable (Entire argument to one variable) in shell script but it is not working Here is what I tried:
str1 ='$*'
str1 ="$*"
set str1 =$*
set str1 ="$*"
set str1 ='(echo $*)'
set str1 ='$*'
If you want to get one variable containig all arguments; use $@
:
str1="$@"