Shell 一次性写入多行文本

#! /bin/bash
cat>test1<<EOF 这是一个由shell创建的文件 this is a file created by shell. we want to make a good world. EOF

其中,<<EOF 表示当遇到EOF时结束输入。

cat>test1<<EOF 这间没有空格

原文地址:https://www.cnblogs.com/cloudstorage/p/3204951.html