发现社区一个脚本执行后,cat命令写入后文件里面的表达式都求值展看了,其实这个是因为$的缘故,参看这个
/>
You can use regular quoting operators in a here document:
$ cat <<HERE
> foo(\$bar)
> HERE
foo($bar)
or you can disable expansion by quoting the here-doc delimiter:
$ cat <<'HERE' # note single quotes
> foo($bar)
> HERE
foo($bar)
阅读(798) | 评论(0) | 转发(0) |