more on pipes and temporary named pipe FIFO process substitution Re: [ack-users] Re: where's line number (a la grep -n)?

45 views
Skip to first unread message

Bill Ricker

unread,
Oct 23, 2008, 10:37:22 AM10/23/08
to ack-...@googlegroups.com
On Thu, Oct 23, 2008 at 9:11 AM, Sitaram Chamarty <sita...@gmail.com> wrote:
> wouldn't work if input is a pipe...

yeah the pipe trumps args . this
$ echo foo | ack foo - /dev/null
ack: Ignoring 2 arguments on the command-line while acting as a filter.
foo
should work but doesn't.

the new bash temporary named pipe as a file "Process Substitution"
should work but doesn't at all
$ ack -a foo <(echo foo) <(echo bar)
$ grep foo <(echo foo) <(echo bar)
/dev/fd/63:foo
see http://tldp.org/LDP/abs/html/process-sub.html
http://www.linuxjournal.com/content/shell-process-redirection

--
Bill
n1...@arrl.net bill....@gmail.com

Reply all
Reply to author
Forward
0 new messages