Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site cognos.UUCP Path: utzoo!dciem!nrcaer!cognos!garyp From: garyp@cognos.UUCP (Gary Puckering) Newsgroups: net.sources.bugs Subject: Re: Neat little alias & technique to facilite troff Message-ID: <320@cognos.UUCP> Date: Wed, 21-Jan-87 10:46:16 EST Article-I.D.: cognos.320 Posted: Wed Jan 21 10:46:16 1987 Date-Received: Thu, 22-Jan-87 06:53:29 EST References: <595@cubsvax.UUCP> <920@houxu.UUCP> Reply-To: garyp@cognos.UUCP (Gary Puckering) Organization: Cognos Inc., Ottawa, Canada Lines: 33 Summary: In article <920@houxu.UUCP> jhv@houxu.UUCP writes: >My approach is to use the shell's "here-document" capability, putting the >command line to format the document as the first line of the document, and >executing the file when I need processed output, for example (to include >tbl, eqn, and pic preprocessors and to print the output on an Imagen >printer): > tbl < ... > !EOF >Then either make the file executable with chmod, or type sh filename to get >the formatted output. Neat idea. I like it. One problem though -- how do you allow for both printed output and terminal output. So, I fiddled for awhile and got this to work: if test "$1" = -p then roff="ptroff -ms" else roff="nroff -ms | more" fi echo $roff eval $roff <