用cat写入

$ cat >> gzip_work.sh <<EOF
> mkdir gzip/workshell
> EOF
原文地址:https://www.cnblogs.com/yuanjingnan/p/12370708.html