10-03-04 02:12 AM
On 2004-09-27, jagadish wrote:
> Stephane CHAZELAS <this.address@is.invalid> wrote in message news:<slrncl6
457.1sg.stephane.chazelas@spam.is.invalid>...
[please don't top post]
[vbcol=seagreen]
> I think, I have not put my requirement properly.
>
> I am looking for this,
>
> if [ $RETCD -ne 0 && [[ $RETCD -ne 2314 || $RETCD -ne 2310 ]
] ]
>
> I want to check two condtions
>
> RETCD not equal to 0 and RETCD not equal 2314
>
> or
> RETCD not equal to 0 and RETCD not equal to 2310
Which is the same as satisfying all of $RETCD -ne 0, $RETCD -ne
2310, and $RETCD -ne 2314.
Which is what Stephane's case statement does.
If you don't agree, please provide a value for $RETCD which
satisfies your conditions, but not Stephane's.
> The replied solution doesnot meet my requirement.They only check for
> one of the three values, but I want to test for combination like
> above.
In what way does it not satisfy the requirement?
--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
========================================
===========================
My code (if any) in this post is copyright 2004, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
[ Post a follow-up to this message ]
|