linux shell写入单行、多行内容到文件
1、单行文本 #! /bin/bash echo 'hello world' > filename.txt 2、多行文本 代码1: #! /bin/bash cat>filename.txt<<EOF hello world 代码改变世界 Coding Changes the World 100 \$ 她买了张彩票,中了3,300...
1、单行文本 #! /bin/bash echo 'hello world' > filename.txt 2、多行文本 代码1: #! /bin/bash cat>filename.txt<<EOF hello world 代码改变世界 Coding Changes the World 100 \$ 她买了张彩票,中了3,300...