Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!caip!nike!ucbcad!ucbvax!NPRDC.ARPA!stanonik From: stanonik@NPRDC.ARPA (Ron Stanonik) Newsgroups: mod.computers.laser-printers Subject: Transcript ptroff bug Message-ID: <8609042205.AA10214@nprdc.arpa> Date: Thu, 4-Sep-86 18:05:00 EDT Article-I.D.: nprdc.8609042205.AA10214 Posted: Thu Sep 4 18:05:00 1986 Date-Received: Mon, 8-Sep-86 05:46:07 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 23 Approved: laser-lovers@washington.arpa We encountered a puzzling bug in the Transcript 2.0 ptroff. The -t option (output postscript to standout) didn't work when piping into ptroff; eg, tbl file | ptroff -t Reversing the order of the arguments to the test in the while loop seems to cure the problem; eg, while test "" != "$1" rather than while test "$1" != "" Apparently test "$1" != "" with $1 equal -t is interpreted as "check whether the next argument (interpreted as a file descriptor) is a tty", rather than "check the equality of the the strings -t and "". As it happens, the numerical value of != is 0; hence, the -t option worked correctly for ptroff -t file but not for tbl file | ptroff -t or ptroff -t < file Ron Stanonik stanonik@nprdc.arpa