【发布时间】:2011-07-12 12:31:24
【问题描述】:
在下面给出的示例中,我期待这条线 $a=b 在 todel.txt 文件中。 如何在不处理的情况下添加 here doc 文本块?
[root@localhost]# cat here_example.sh
#!/bin/sh
cat > todel.txt << heredoc
<?php
$a=b
# this is comment
?>
heredoc
[root@localhost]# cat todel.txt
<?php
=b
# this is comment
?>
【问题讨论】: