Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!jsq From: ske@pkmab.se (Kristoffer Eriksson) Newsgroups: comp.std.unix Subject: Re: File system name space (/dev/fd) Message-ID: <14161@cs.utexas.edu> Date: 30 Oct 90 09:01:59 GMT References: <14012@cs.utexas.edu> <14014@cs.utexas.edu> <14102@cs.utexas.edu> Sender: jsq@cs.utexas.edu Organization: Peridot Konsult i Mellansverige AB, Oerebro, Sweden Lines: 22 Approved: jsq@cs.utexas.edu (Moderator, John S. Quarterman) X-Submissions: std-unix@uunet.uu.net Submitted-by: ske@pkmab.se (Kristoffer Eriksson) In article <14102@cs.utexas.edu> addw@phcomp.co.uk (Alain Williams) writes: >> join <(prog1) <(prog2) > joined-output-of-progs-1-and-2 >Anyway, the above wouldn't work with a straight /dev/fd as has been talked about >here recently. Why ? The trouble is that if /dev/fd contains files with >names "0", "1", ... "19", the programs prog1 & prog2 would both have a file >/dev/fd/1 as their stdout, join would see another /dev/fd/1. That's not how you do it. Prog1 and prog2 just output to their standard outputs, as they always do, and the shell sets up pipes from prog1 and prog2 to join. The /dev/fd names for these pipes, as seen by join, are then passed as argv[] parameters to join, to make it read them. Prog1 and prog2 never see them. -- Kristoffer Eriksson, Peridot Konsult AB, Hagagatan 6, S-703 40 Oerebro, Sweden Phone: +46 19-13 03 60 ! e-mail: ske@pkmab.se Fax: +46 19-11 51 03 ! or ...!{uunet,mcsun}!sunic.sunet.se!kullmar!pkmab!ske Volume-Number: Volume 22, Number 12