What "isatty"?

Chris Torek chris at mimsy.UUCP
Mon May 22 09:44:47 AEST 1989


In article <2421 at Portia.Stanford.EDU> joe at hanauma (Joe Dellinger) writes:
>	I have a graphics driver program which has 2 basic behaviours.
>If you do
>	pspen < plot.data > file
>it writes postscript code to "file". If you do
>	pspen < plot.data
>it spools the postscript for you.

Yuck.

Programs that produce output should produce the output to stdout.  If
they will rarely be used to write to anything but the spooler, they
should be given a less-accessible name and the program the user runs
should be a shell script:

	real-pspen < plot.data | lpr -Pfoo

In particular, the method by which one spools something to a particular
printer is *very* system dependent%.  For instance, we use MDQS; UCB
uses Berkeley lpr; some people use SysV lpr; and once we used a local
spooler.  All of these are nicely incompatible.
-----
% At least, if you will accept degrees of system dependency, spoolers
  are near the top :-)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list