打开终端编写一个shell脚本文件,实现打印"hello world!"
切换到root用户,给shell脚本文件赋予执行权限:chmod o+x first.sh
first.sh的格式内容如下:
#!/bin/bash
#Filename:first.sh
#auto echo hello world!
#by authors wg 2020
echo "hello world!"
./first.sh运行结果
打开终端编写一个shell脚本文件,实现打印"hello world!"
切换到root用户,给shell脚本文件赋予执行权限:chmod o+x first.sh
first.sh的格式内容如下:
#!/bin/bash
#Filename:first.sh
#auto echo hello world!
#by authors wg 2020
echo "hello world!"
./first.sh运行结果