I was wondering if you would help me figure out a problem with using the
test program.  I'm
not sure if it is a bug or just something not commonly known.

I was attempting to use

if [ "$1" = "-l" ]

and entered "<scriptname> -l" on  the command line.  I then received a
"binary operator needed" error.  I assume that the evaluation became

-l = -l

which should evaluate for strings as true, but doesn't.  I was told that I
needed to use

if [ x"$1" = x"-l" ]

to make this work correctly.  This is not documented in the man for test.
Can you point
me to a man page that explains why you need to do this?  I would really
appreciate it.

Thanks,
Matt


**************************
Matthew J. Mattson
QA Engineer
epicRealm, Inc.
Email:   [EMAIL PROTECTED]
**************************

Reply via email to