On another, non-ksh related, mailing list, someone wrote:
> <> is a legal operator under SCO's old version of ksh, and also under
> Linux's bash.
>
> This runs fine under 5.0.7 and ksh:
>
> aa="OK"
>
> if [ "$aa" <> "XX" ]
> then
> echo "Was not XX"
> fi
>
> The echo line displays when run.
This indeed works as he describes, but the case where the two items
being tested are equal does not. I.e.:
aa="OK"
if [ "$aa" <> "OK" ]
then
echo "Was not XX"
fi
This still prints "Was not XX". I don't believe <> was ever valid
syntax, so what is really going on here. Are the <> operators being
interpreted as IO redirection? Why does the shell not generate an error?
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users