On Wed, 12 Dec 2001, Richard Pruitt wrote: > How do I verify if a user already exists? > > I have this, but it gives me unary error when the user doesn't exist > because it doens't output a numeric value.
> var2=`/usr/bin/id -u $var1` Check the exit status here. if [ $? -eq 1 ]; then # Does not exist ... Jeremy C. Reed echo 'G014AE824B0-07CC?/JJFFFI?D64CB>D=3C427=>;>6HI2><J' | tr /-_ :\ Sc-y./ | sed swxw`uname`w _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list