I want to pass arguments to a script in the form
./myscript.sh -r [1,4] -p [10,20,30]
where in myscript.sh if I do:
echo $@
But I'm getting the output as
-r 1 4 -p 1 2 3
How do I get output in the form of
-r [1,4] -p [10,20,30]
I'm using Ubuntu 12.04 and bash version 4.2.37
./test1.bash -r [1,4] -p [10,20,30]output:-r [1,4] -p [10,20,30]zsh,csh,shandbashinterpreter and they all returned your desired output...