For example:
CMD="ls /tmp/spaced\ dir"
And when using the command:
$ $CMD
ls: /tmp/spaced\: No such file or directory
ls: dir: No such file or directory
Not functional with:
CMD="ls /tmp/spaced\\ dir"
CMD="ls \"/tmp/spaced dir\""
CMD="ls \"/tmp/spaced\\ dir\""
CMD='ls \"/tmp/spaced dir\"'
And I need the parameter “/tmp/spaced dir” to be in a variable…
Of course, the directory “/tmp/spaced dir” does exist.
OK, found a solution using
eval: