1 ai277014717 2018-03-07 12:13:23 +08:00 变量替换 反引号中的内容会解析成命令 |
![]() | 2 jasonyang9 2018-03-07 12:15:16 +08:00 bash command substitution 了解一下 https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html |
![]() | 3 mune OP @ai277014717 但是请问为什么要有反引号呢,表示优先执行吗, |
![]() | 4 jasonyang9 2018-03-07 12:19:28 +08:00 对啊,`grep oldstring -rl path` 这条命令先执行,其结果是匹配到内容的文件名列表,然后被 sed 用正则表达式替换内容 |
![]() | 5 mune OP @jasonyang9 感谢感谢! |