Maybe:
id | awk '{print $1}' | grep -q '(root)'

plus 999 other ways to skin the cat
meow.

On Wed, 12 Oct 2005, 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.)

-DMZ

Reply via email to