头部声明规范
#!/bin/bash
#Author: wang
#Version: 1.0
#Date: 2016-05-01
#Description:The script displays system information
echo "Greetings. The date and time are $(date)"
echo "Your working directory is: $(pwd)"
bash
bash 和source执行脚本的区别
bash会开子shell执行,.和source会在当前shell执行
检测脚本中的语法错误bash -n /path/to/some_script 调试执行bash -x /path/to/some_script\显示没条命令的结果及层级