shelll脚本创建一个文件,并写入内容

下面是一个简单的 shell 脚本,它可以创建一个名为"hello.txt"的文件,并向其中写入"hello world" #!/bin/bash # 创建文件 touch hello.txt # 向文件写入内容 cat hello.txt | tr -d '\n' > /dev/null echo
posted @ 2023-05-10 23:38  jarsing  阅读(3087)  评论(0编辑  收藏  举报