Re: shell script problem so simple I'm embarassed to ask

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jeremy C. Reed
Date:  
To: plug-discuss
Subject: Re: shell script problem so simple I'm embarassed to ask
On Thu, 10 Feb 2005, Craig White wrote:

> if $USERADMIN_ACTION=ADD_USER; then


A couple problems.

Add spaces around the equal sign.

But then the shell will still evaluate and run the first value.

Use test or [.

man [

if [ "${USERADMIN_ACTION}" = "ADD_USER" ]; then


Jeremy C. Reed

                 BSD News, BSD tutorials, BSD links
                http://www.bsdnewsletter.com/



---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss