1.shell脚本
Shell Script, Shell脚本与Windows/Dos下的批处理相似,也就是用各类命令预先放入到一个文件中,方便一次性执行的一个程序文件,主要是方便管理员进行设置或者管理用的。但是它比Windows下的批处理更强大,比用其他编程程序编辑的程序效率更高,它使用了Linux/Unix下的命令。
2.创建第一个shell脚本
vi first.sh
chmod 700 first.sh
./firt.sh
3.first.sh中写shell脚本内容
例如:linux下shell脚本获取网络信息
#! /bin/sh
default_route=$(ip route show)
default_interface=$(echo