摘要:#!/bin/bashROOT_UID=0E_WRONG_USER=65if [ "$UID" -ne "$ROOT_UID" ]thenecho;echo "You must be root to run this script.";echoexit $E_WRONG_USERfiROOTUSER_NAME=root username=`id -nu` if [ "$username" != "...
阅读全文
摘要:#!/bin/bashfunc(){echo "$1"}echo "fist call to function: no arg passed."echo "see if command-line arg is seen."funcechoecho "second call to function: command-line arg passed explicitly."func $1exit 0#...
阅读全文