cat EOF 使用一例
时间:2014-09-10 22:38 来源:linux.it.net.cn 作者:it
cat EOF 使用一例,用下面方法很简单的按格式写入文本:
复制代码代码如下:
#!/bin/sh
cat <<EOF >>/etc/hosts
Please Write your message want to attach here.
# This is just a test.
127.0.0.1 localhost
EOF
#-----------
echo 'test' >> /etc/hosts
sed...
(责任编辑:IT)
cat EOF 使用一例,用下面方法很简单的按格式写入文本:
复制代码代码如下:
#!/bin/sh
cat <<EOF >>/etc/hosts
127.0.0.1 localhost
#----------- sed... (责任编辑:IT) |