#! /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 这间没有空格

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2021-08-04
  • 2021-07-14
猜你喜欢
  • 2022-01-28
  • 2021-11-06
  • 2021-08-22
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-05-15
相关资源
相似解决方案