第一个文件storeip.sh,用来保存记录的
#!/bin/shprintf "Enter the Name :"read iplocalprintf "Enter the IP:"read ipprintf "Enter the netmask:"read maskprintf "Enter the gateway:"read gateif [ ! -f ipdata ] ; then touch ipdatafinum=`wc -l ipdata | awk " { printf "%s", $1=$1+1 } "`printf "$num $iplocal $ip $mask $gate
" >;>; ipdata