I have a script which gets called with two parameters:
./script.sh a b
I'm currently reading them through $1 and $2 (such as
cd $1). My problem is that the output needs to be the same for when the script gets called with quoted parameters:
./script.sh "a b"
which, if I understand it correctly, passes both parameters into the
Is there a simple and clean way to do this or do I need to check the first parameter for spaces, split it into an array, pass parts of the array into two separate variables and then use them throughout the script?