并且使用命令时:
$ $CMD
ls: /tmp/spaced\: No such file or directory
ls: dir: No such file or directory
不具有的功能:
CMD="ls /tmp/spaced\\ dir"
CMD="ls \"/tmp/spaced dir\""
CMD="ls \"/tmp/spaced\\ dir\""
CMD='ls \"/tmp/spaced dir\"'
而我需要的参数“/tmp/spaced dir
”在变量中... 当然,目录“/tmp/spaced dir
“确实存在。
不是别名,此命令可能只用于当前脚本 –