日期:2014-05-16 浏览次数:20666 次
[root@RHEL6A scripts]# vim s7.sh
[root@RHEL6A scripts]# more s7.sh
#!/bin/bash
while [ $# -gt 0 ]; do
case $1 in
start)
echo 'process starting...'
exit 0
;;
stop)
echo 'process stoping...'
exit 0
;;
*)
echo "Internal Error: option processing error: $1" 1>&2
exit 1
;;
esac
done
[root@RHEL6A scripts]# chmod u+x s7.sh
[root@RHEL6A scripts]# ./s7.sh start
process starting...
[root@RHEL6A scripts]#