On Wed, Oct 12, 2005 at 10:31:01AM -0400, David Zakar wrote: > Anyone know of a fast way to shell script a check to see if the user is > root? I'd prefer something that works in sh for maximum compat. > > (Yes, this should be very easy. My shell scripting knowledge is very > bad, though.)
if [ `id -u` == 0 ] ; then...
echo yah you are root
fi
- Rob
.
