Path: csiph.com!xmission!news.snarked.org!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!171.64.64.130.MISMATCH!usenet.stanford.edu!not-for-mail From: Greg Wooledge Newsgroups: gnu.bash.bug Subject: Re: Design question(s), re: why use of tmp-files or named-pipes(/dev/fd/N) instead of plain pipes? Date: Mon, 19 Oct 2015 15:59:01 -0400 Lines: 19 Approved: bug-bash@gnu.org Message-ID: References: <56218DA5.8030501@tlinx.org> <5622CDC8.2030102@case.edu> <5622EB23.6020700@tlinx.org> <20151019122800.GS27325@eeg.ccf.org> <56254945.6020606@tlinx.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1445284748 27033 208.118.235.17 (19 Oct 2015 19:59:08 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash To: Linda Walsh Envelope-to: bug-bash@gnu.org Content-Disposition: inline In-Reply-To: <56254945.6020606@tlinx.org> User-Agent: Mutt/1.4.2.3i X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 139.137.100.1 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11711 On Mon, Oct 19, 2015 at 12:49:25PM -0700, Linda Walsh wrote: > Greg Wooledge wrote: > >A simple example: > > > >diff -u <(sort file1) <(sort file2) > ---- > You claim <(sort file1) is a filename? $ ls -l <(sort .bashrc) lr-x------ 1 wooledg wooledg 64 Oct 19 15:56 /dev/fd/63 -> pipe:[55954] ls thinks it is. The whole point of this construction is that it generates a thing that can be open()ed by a program that isn't bash. So you can drop it into programs that require a filename argument, like diff. Nobody ever said it's a regular file.