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

Kezdőlap
Csatolmányok:
Üzenet email-ben
+ (text/plain)
Üzenet törlése
Válasz az üzenetre
Szerző: Jeremy C. Reed
Dátum:  
Címzett: plug-discuss
Tárgy: 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