bash – 如何在设置别名时避免单引号

前端之家收集整理的这篇文章主要介绍了bash – 如何在设置别名时避免单引号前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
要创建此命令的别名
  1. find . -name '*.sh' -exec chmod a+x '{}' \;@H_502_2@
  2. 在设置时我无法逃避单引号
    别名

  3. alias mx='find . -name '*.sh' -exec chmod a+x '{}' \;'@H_502_2@ 
  4.  

    任何帮助是赞赏。

你可以使用双引号:
  1. alias mx="find . -name '*.sh' -exec chmod a+x {} \;"@H_502_2@
  2. 编辑:此外,{}周围的单引号不是必需的。

猜你在找的Bash相关文章