On Tue, 18 May 1999, Adam Morrison wrote:
To all the helpfull people:
I believe that when you create shell scripts, they'd better be generic,
unless there is a special reason, and if there is, it should be documented
in the script. (like using functions, which work in bash/ksh, but not in
the generic /bin/sh on many OSs.)
I know "$variable" works on bash/ksh.
So just treat Vadik and I as purists.
--Ariel
> Ariel Biener wrote:
>
> > Which will result in the script fo fail if $PARAM is undefined.
> >
> > Vadim's suggestion wasn't just a matter of semantics.
> >
> > --Ariel
> > > Vadim Vygonets <[EMAIL PROTECTED]> writes:
> > >
> > > > > [ "$PARAM" != "SOMETHING"] || {
> > > > > ;}
> > > > I think that it's better to do:
> > > > if [ "X$PARAM" != "XSOMETHING" ]; then .....
> > >
> > > Yes you right it's more unix, but i usually use the "$PARAM" !=
> > > "SOME".
>
> Hmm.
>
>
> $ test "$FROB" != "" || echo "frob!"
> frob!
> $
>
> Hrmph.
>
+---------------------------------------------------------------+
| Ariel Biener |
| e-mail: [EMAIL PROTECTED] Work phone: 03-6406086 |
| fingerprint = 07 D1 E5 3E EF 6D E5 82 0B E9 21 D4 3C 7D 8B BC |
+---------------------------------------------------------------+