heyyou=homeecho “$heyyou” # We get home `command` 倒引号 (backticks) 在前面的单双引号,括住的是字串,但如果该字串是一列命令列,会怎样?答案是不会执行。
基于24个网页-相关网页
Whenever I can, I write shell scripts as Ruby scripts with lots of backticks.
我当时能做的就只能写那种满是倒引号(backticks)的shell脚本来作为Ruby脚本。
Particular care should be taken with this approach (and any approach that uses the system() function, backticks, or any user-provided input to do file operations).
尤其要注意这种方法(以及使用 system() 函数、重音号或任何用户提供的输入来进行的文件操作)。
应用推荐