标签:脚本 strong 技术 直接 执行 nbsp logs 方式 固定
#!/bin/bash (固定开头)
# 注释(脚本中)
cat 1.sh 查看脚本
1.执行脚本
1)先给脚本执行权限
chmod 744 1.sh 或 chmod +x 1.sh
2)执行
./1.sh (./当前路径)
2.赋予权限直接运行
chmod a+x first.sh
./first.sh
3.通过bash或sh运行脚本
bash first.sh
sh first.sh
4.通过 . 或source运行脚本
source first.sh
. first.sh
标签:脚本 strong 技术 直接 执行 nbsp logs 方式 固定
原文地址:http://www.cnblogs.com/songyu1015/p/7658768.html