开发者社区 问答 正文

覆盖有哪两种格式可以使用?

已解决

覆盖有哪两种格式可以使用?

展开
收起
酸不李子 2022-04-01 23:03:36 669 分享 版权
1 条回答
写回答
取消 提交回答
  • 推荐回答

    格式一

    #!/bin/bash

    cat << EOF > /root/test.txt

    Hello!

    My site is www.361way.com

    5.My site is www.91it.org

    Test for cat and EOF!

    EOF

    格式二

    #!/bin/bash

    cat > /root/test.txt <<EOF

    Hello!

    My site is www.361way.com

    5.My site is www.91it.org

    Test for cat and EOF!

    EOF

    2022-04-29 20:54:32
    赞同 展开评论
问答地址: