in reply to Re^3: passing pipes on the command line
in thread passing pipes on the command line

Exactly. It's a very nice trick when you have a program that expects to read from a file, and has no facilities for reading from STDIN. A common example is diff:

diff <(grep foo file1 | sort -u) \ <(grep foo file2 | sort -u)

Of course, we have rapidly veered off topic for the Monastery, so I digress. :-)

Replies are listed 'Best First'.
Re^5: passing pipes on the command line
by ambrus (Abbot) on Mar 23, 2005 at 21:03 UTC

    Sure, it's very useful. Of course, diff can read one of its inputs from stdin, so you can use

    grep foo file1 | sort -u | diff - <( grep foo file2 | sort -u )