Reputation: 22064
I read this article, in the part
### NO NO NO: this passes three strings:
### (1) "my
### (2) multiword
### (3) argument"
MYARG="\"my multiword argument\""
somecommand $MYARG
### THIS IS NOT (!!!!) THE SAME AS ###
command "my multiword argument"
### YOU NEED ###
MYARG="my multiword argument"
command "$MYARG"
both of method interpret as a full string, different from what it says in the article:
test.bash
#! /bin/bash
echo $1
./test.bash "\"my good ness\""
"my good ness"
Upvotes: 0
Views: 64
Reputation: 798676
You're passing it directly as an argument, rather than putting it in a variable and passing that. There is no valid comparison between the two methods.
Upvotes: 1