🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.misc
Article #789

Re: Icons, pipes, etc.

#789
From: Simon Brown
Date: Wed, 31 Dec 1969 22:59
44 lines
2808 bytes
In article <2187@emory.uucp> arnold@emory.UUCP (Arnold D. Robbins {EUCC}) writes:
>
>There exists a notation to do this in ksh-i, the latest version of ksh. To
>use it though, your Unix must have the V8 /dev/fd  mechanism (keep an eye
>on comp.sources.unix for a driver for 4.3 & NFS systems, from me, originally
>from Fred Blonder). Anyway the notation is
>
>	sort (awk) (sort | grep)
>
>The ()'s enclose a shell pipeline, if preceded by a '<' or left alone,
>the pipline's output is connected to a file in /dev/fd passed as the argument
>to the program. The file will be the read end of a pipe, so sort would
>see, e.g., "/dev/fd/4" and "/dev/fd/5" for its arguments, awk and the 
>sort|grep pipeline would write on the other side of the pipe.
>
>Arnold Robbins

You can also implement this on a system that has FIFO special files. This
has the advantage that the filenames that are passwd to the program are
not forced to be of that special form /dev/fd/[number] - anything will do,
so long as you can mknod a fifo with that name! This is useful for programs
which insist on their filename parameters having special suffixes (such as
cc, ld, tex, etc...). 
The only problem is thinking of a notation for allowing a filename to be
given, if required, on the command line to be associated with a command.
Something like (#filename command) is pretty gross, but I can't think of
anything better. It does mean you can type straight into cc though, with
	cc (#x.c cat)
(which cats from stdin into a fifo called x.c, and cc is called with this
fifo as its argument).

Another problem is that the fifo has to be removed when the command is
finished - which can cause problems when the command is put in the background.

	%{
	    Simon.
	%}
-- 
----------------------------------
| Simon Brown                    | UUCP:  seismo!mcvax!ukc!its63b!simon
| Department of Computer Science | JANET: simon@uk.ac.ed.its63b
| University of Edinburgh,       | ARPA:  simon%its63b.ed.ac.uk@cs.ucl.ac.uk
| Scotland, UK.                  |
----------------------------------     "Life's like that, you know"
Technical Details
Message-ID: <555@its63b.ed.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!ukc!its63b!xsimon
References: <8705190042.AA14664@cogsci.berkeley.edu> <9954@decwrl.DEC.COM> <66@laura.irb.informatik> <409@sugar.UUCP> <165@xyzzy.UUCP> <2187@emory.uucp>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!ukc!its63b!xsimon
From: xsimon@its63b.ed.ac.uk (Simon Brown)
Newsgroups: comp.windows.misc
Subject: Re: Icons, pipes, etc.
Message-ID: <555@its63b.ed.ac.uk>
Date: Wed, 31-Dec-69 18:59:59 EDT
Article-I.D.: its63b.555
Posted: Wed Dec 31 18:59:59 1969
Date-Received: Sat, 8-Aug-87 09:01:09 EDT
References: <8705190042.AA14664@cogsci.berkeley.edu> <9954@decwrl.DEC.COM> <66@laura.irb.informatik> <409@sugar.UUCP> <165@xyzzy.UUCP> <2187@emory.uucp>
Reply-To: xsimon@its63b.ed.ac.uk (Simon Brown)
Organization: Computer Science Department, Edinburgh University
Lines: 44