Article View: comp.unix.shell
Article #265Re: Where does the sugar go? (was Re: Sort problem )
From: Duncan Sinclair
Date: Sun, 02 Aug 1992 21:16
Date: Sun, 02 Aug 1992 21:16
24 lines
1792 bytes
1792 bytes
boyd@prl.dec.com (Boyd Roberts) writes:
>In article <1992Aug2.143248.25046@druid.uucp>, darcy@druid.uucp (D'Arcy J.M. Cain) writes:
>> Or do like ls(1) and find out if the output device is a tty, pipe or ...
>Yep, that really sucks. Never do that.
I do that in a program I hacked, except that the non-interactive output
is visually identical to the interactive output, the only difference
being that the program doesn't bother chatting to the user while deciding
whether it shall generate some particular output. It's easier to process
a line of output when it doesn't start "string\cstring\cstring\c...".
This program, btw, scans machines for users logged on. It shows you
the machine it's asking, then wipes it out if there's no-one logged on.
On the main thread of the discussion, sugar should go to stdout, and
there should be a flag to turn it on or off. (Which the program I
was just discussed has for it's headings...)
--
Duncan Sinclair | Try one sinclair@dcs.glasgow.ac.uk
Computing Science Research Student | of these: sinclair@uk.ac.glasgow.dcs
University of Glasgow |..!mcsun!ukc!uk.ac.glasgow.dcs!sinclair
--- Rave Culture: Don't techno for an answer. ---
Technical Details
Message-ID:
<1992Aug2.211652.27837@dcs.glasgow.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!glasgow!sinclairReferences:
<1992Jul31.000822.13317@convex.com> <84902@netnews.upenn.edu> <ESH.92Jul31101723@lithium.tekbspa.com> <1992Aug2.143248.25046@druid.uucp> <1992Aug2.190512.20492@prl.dec.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!glasgow!sinclair From: sinclair@dcs.glasgow.ac.uk (Duncan Sinclair) Newsgroups: comp.unix.shell Subject: Re: Where does the sugar go? (was Re: Sort problem ) Message-ID: <1992Aug2.211652.27837@dcs.glasgow.ac.uk> Date: 2 Aug 92 21:16:52 GMT References: <1992Jul31.000822.13317@convex.com> <84902@netnews.upenn.edu> <ESH.92Jul31101723@lithium.tekbspa.com> <1992Aug2.143248.25046@druid.uucp> <1992Aug2.190512.20492@prl.dec.com> Organization: Glasgow University Computing Science Dept. Lines: 24