多行命令直接做一个.sh文件使用

比如要依次执行A B C3条语句
写如下代码

#!/bin/sh
A
B
C

保存为test.sh
然后添加执行权限chmod +x test.sh
然后执行该脚本./test.sh
#!/bin/sh
A
B
C

保存为test.sh
然后添加执行权限chmod +x test.sh
然后执行该脚本./test.sh

猜你喜欢

转载自blog.csdn.net/weixin_39393741/article/details/84986991