[prev in list] [next in list] [prev in thread] [next in thread]
List: ast-users
Subject: [ast-users] ksh beta bug #2 - (cmd|cmd2) rval
From: kplloyd () lucent ! com (kurt_p_lloyd)
Date: 2004-06-08 11:04:14
Message-ID: 40C5D566.4040904 () lucent ! com
[Download RAW message or body]
Version M 1993-12-28 p+
INIT.2004-05-09.tgz, ast-ksh.2004-05-09.tgz
Built on a Solaris 2.5.1 machine for use on
Solaris 2.5.1 and Solaris 8 machines.
Attached is a snippet from a function in which
(cmd | cmd2) returned 0 even though cmd2 returned 1.
I am unable to reproduce this behavior at will.
-Kurt Lloyd, kplloyd@lucent.com, (978) 392-2373
-------------- next part --------------
function Snd_ {
....
[[ -n "$NO_AUTON_MSG_PREP" ]] || CAPTURE_OFF= Set_Spool_Ptr_Array_ ${TID_SND}:$cssp_
### AJF - 6/7/04: changed the format of the "test" to use square
### brackets. This is Kurt's version.
(echo "$essin_output"|grep "^essin: Permission denied\." >/dev/null) && {
echo essin_output=$essin_output
echo $?
echo "$essin_output"|grep "^essin: Permission denied\."
echo $?
echo "$essin_output"|grep "^essin: Permission denied\." >/dev/null
echo $?
(echo "$essin_output"|grep "^essin: Permission denied\." >/dev/null)
echo $?
(echo "$essin_output"|grep "^essin: Permission denied\." >/dev/null) && echo foobar
echo "FAILED communicating with '${TID_SND}'" >&2
echo "$essin_output" >&2
PRES_=
return 1
}
....
set -x output:
Set_Spool_Ptr_Array_[407]: SPOOLID=cit-2
Snd_[319]: grep '^essin: Permission denied\.'
Snd_[319]: echo 'RTRV-STATE-EQPT:a::ULT028;'
Frame_Offset.tc[319]: 1> /dev/null
Snd_[320]: echo essin_output='RTRV-STATE-EQPT:a::ULT028;'
essin_output=RTRV-STATE-EQPT:a::ULT028;
Snd_[321]: echo 0
0
Snd_[322]: grep '^essin: Permission denied\.'
Snd_[322]: echo 'RTRV-STATE-EQPT:a::ULT028;'
Snd_[323]: echo 1
1
Snd_[324]: grep '^essin: Permission denied\.'
Snd_[324]: echo 'RTRV-STATE-EQPT:a::ULT028;'
Frame_Offset.tc[324]: 1> /dev/null
Snd_[325]: echo 1
1
Snd_[326]: grep '^essin: Permission denied\.'
Snd_[326]: echo 'RTRV-STATE-EQPT:a::ULT028;'
Frame_Offset.tc[326]: 1> /dev/null
Snd_[327]: echo 0
0
Snd_[328]: grep '^essin: Permission denied\.'
Snd_[328]: echo 'RTRV-STATE-EQPT:a::ULT028;'
Frame_Offset.tc[328]: 1> /dev/null
Snd_[328]: echo foobar
foobar
Snd_[329]: echo $'FAILED communicating with \'a\''
Frame_Offset.tc[329]: 1>& 2
FAILED communicating with 'a'
Snd_[330]: echo 'RTRV-STATE-EQPT:a::ULT028;'
Frame_Offset.tc[330]: 1>& 2
RTRV-STATE-EQPT:a::ULT028;
Snd_[331]: PRES_=''
Snd_[332]: return 1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic