在linux下创建一个可运行shell脚本(.sh文件)

1.touch hello.sh

2.vim hello.sh

  use "i" to write into the file 

    write:

    #!/bin/sh

    echo hello world;

3.use"esc"、 "wq" to save the file

4.chmod 700 hello.sh (change the binary file mode)

5.execute the file by the commond: bash ./hello.sh

posted @ 2022-02-10 22:44  呦呦南山  阅读(747)  评论(0编辑  收藏  举报