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

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Jeremy C. Reed
日付:  
To: plug-discuss
題目: 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