Reputation: 15592
Let's say there is one script s1
, and I need to pass argument $1
with value foo bar
, with space in it. This can be done
./s1 "foo bar"
however, when I want to run the above command in another script (say s2
), how should I put it? If I put it as above, foo bar
will be interpreted as two arguments (to s1) rather than one.
Upvotes: 9
Views: 20997
Reputation: 61970
Use single quotes.
./script 'this is a line'
To consider variable substitutions use double quotes
./script "this is a line"
Upvotes: 1