打印相关的信息
#!/bin/bash source /etc/rc.d/init.d/functions; PrintResult() { #echo "arg0 = $0"; #echo "arg1 = $1"; #echo "arg2 = $2"; #echo "arg3 = $3"; if [ $1 = 0 ] ; then action "$2" /bin/true else action "$2" /bin/false exit $3 fi } #for test #PrintResult 0 "first ok..."; #PrintResult 1 "hello, andylin"; #PrintResult 0 "ok, succ!"; #PrintResult 2 "other result!";