[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Command-line mystery



Jason Henry Parker wrote:
> 
> Many a time I wished I had a shell that somehow had Perl's concept of
> context to perform pipelining with.
> 
> sort grep -l string find . -name...

It does, if you realize that perl's commands are "functional",
not "pipelined". So

	sort $(grep -l string $(find . -name ...))

But to be more perlish, you'd need a way to give out-of-band arguments
to the commands, such as the "-l string" to grep.  Maybe something like

	sort [ -r ]  grep [ -l string ] find [ . -name ...]

-- 
John Porter


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe