What \"isatty\"?

John E Van Deusen III jiii at visdc.UUCP
Sat May 27 09:06:24 AEST 1989


In article <19756 at adm.BRL.MIL> rbj at dsys.icst.nbs.gov (Root Boy Jim) writes:
>
> I agree completely, Chris. Now get cracking on `cc', so that
> `cc prog.c' writes to stdout instead of `a.out' :-)

	$ cat xxx > xxx
	cat: input xxx is output

Oh thank you for saving me from my stupid error Mr. cat(1)!  I guess
I am under too much pressure to finish this work before the deadline.

	$ cat xxx
	$

Mere humans can not be trusted to I/O redirection.  It is simply a
matter of time until even the best and brightest of us screw up.  To
efficiently use Unix, the standard output has to be redirected, but if
at all possible, the place to redirect the output is within the
executable:

	...
	test $STATUS = $COPACETIC && exec 1>precious.dat
	...
--
John E Van Deusen III, PO Box 9283, Boise, ID  83707, (208) 343-1865

uunet!visdc!jiii



More information about the Comp.unix.wizards mailing list