Re: [dev] Find window with dmenu
Yes, you can string a huge bunch of stuff in one grep invocation, which is
great until you discover you want to do other stuff down the line.
Considering he's already doing rudimentary filtering through in *addition*
to sed calls, awk is more generalisable choice to the problem set.
Chris
On 12 February 2013 20:18, Martti Kühne <mysatyre_AT_gmail.com> wrote:
> On Tue, Feb 12, 2013 at 10:39 AM, Chris Down <chris_AT_chrisdown.name> wrote:
> > Just a comment on your method rather than your problem, calling ''grep''
> > that many times through that many pipes is fairly expensive and should be
> > avoided, since it has to create each new process and pass the same data
> > through every single one. You'd be better using awk and a single pipe.
> >
> > Chris
> >
>
>
> Last time I checked, grep supports multiple -e arguments. also, with
> egrep, you can use an "acutal" regex of the type 'a|b|c' or even
> 'a|b|c(d|e)' (matching 'a', 'b', 'cd' and 'de' at once)
> Reading manpages really pays off.
>
> cheers!
> mar77i
>
>
Received on Tue Feb 12 2013 - 13:22:59 CET
This archive was generated by hypermail 2.3.0
: Thu Feb 21 2013 - 19:19:23 CET