Script to check weather user is root or not

if [ "$UID" -ne "$ROOT_UID" ]
then
 echo "Must be root to run this script."
 exit $E_NOTROOT
fi

1 comment:

anilreddy said...

can u plz send linux interview questions &answers to my mail id
this is my id thouduanilreddy@gmail.com