ruck@sphere.UUCP (John R Ruckstuhl Jr) (03/18/90)
In a directory of ~70 compressed files, I am searching each file (uncompressed) for a string. The following !succeeds! when in a file and executed as "sh file" or "ksh file", or when typed at the prompt of an interactive "sh", but !fails! when typed at the prompt of an interactive "ksh". Specifically, when typed at the prompt of "ksh", this command outputs ~5 false-positives (arbitrary in that I notice no correlation between the false-positives of different executions). for I in *; do if zcat $I | grep '^OMess' > /dev/null; then echo $I fi done Apparently, the status tested by the "if" statement is unreliable in my interactive "ksh". Please help me understand why/how this can occur. Is this a manifestation of a known bug -- if so, is there a known solution? Thank you for any help. sphere is a 3b1 with OS 3.51, Development Set 3.5, compress 4.0. "what" shows /bin/ksh: ksh/sh:msg.c 1.2 ksh:ksh.sl 1.8 /bin/sh: brnsh:brnsh.sl 1.8 -- John R Ruckstuhl, Jr ...!hplabs!hp-lsd!sphere!ruck