1.table 自动补齐命令行
2.clear 清空终端内容
3.echo 显示
4.
func()
{
代码块
}
5. sh xx.sh 运行sh文件,注意需要到文件所在的文件夹之下进行运行
6. 两个小实例:
1 #! bin/bash 2 #filename :date 3 #show the date in the way: 4 echo "hello,vae" 5 echo "hello!" 6 echo "have a nice day"
1 #!/bin/bash 2 #filename:welcome 3 first() 4 { 5 echo "===========================" 6 echo "hello!" 7 echo "===========================" 8 9 } 10 11 second() 12 { 13 echo "****************************" 14 echo "****************************" 15 } 16 17 first 18 second 19 second 20 first
7.