I am trying to write a shell script, and get the input parameters, like:
./test abc def ghi
If there is a echo $* inside the script, it would list down the parameters, however quotation marks disappear, like
./test abc "def ghi" –> abc def ghi
I dont want to run the command with back-slash as ./test abc \"def ghi\", although it could solve this problem. echo $2 would not solve the quotation inside it, like ./test abc "def ghi "jkl" mno"
Is there any other way to solve it? Thank you:)
You can also use single quotes: