1. 程式人生 > >shell,sed ,寫入文件,追加內容,修改內容

shell,sed ,寫入文件,追加內容,修改內容

空格 file 追加 pre ash 修改內容 一個 追加內容 eat

#! /bin/bash

echo "測試寫文件"
cat>test1<<EOF
這是一個由shell創建的文件
this is a file created by shell.
we want to make a good world.
EOF

其中,<<EOF 表示當遇到EOF時結束輸入。

cat>test1<<EOF 這間沒有空格

shell,sed ,寫入文件,追加內容,修改內容