Cristea Bogdan wrote:
> Here is the piece of code I have used:
> 
> ROOT_UID=0 # Only users with $UID 0 have root privileges.
> E_NOTROOT=67 # Non-root exit error.
> if [ "$UID" -ne "$ROOT_UID" ]; then
>     echo "Must be root to run this script."
>     exit $E_NOTROOT
> fi
> 
> There is a forum about bash scripting: http://bashscripts.org/
Thanks Bogdan!


-- 
David C. Rankin, J.D., P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to