(perhaps I should expand since that's perhaps a "no shit" considering it's
ERE)
sed has no ERE in POSIX, and kinda lacks for certain functionality when
you're looking for portability. In general awk doesn't suffer the same
caveat. But I'm an awk fanboy, so I would say that.
Chris
On 13 February
-r is not POSIX.
On 13 February 2013 07:29, Nimrod Omer wrote:
>
> > I disagree because grep (with -E or as egrep) does support Extended
> > Regular Expressions, which sed does not.
> >
>
> sed -r
>
> I disagree because grep (with -E or as egrep) does support Extended
> Regular Expressions, which sed does not.
>
sed -r
markus schnalke wrote:
> I disagree because grep (with -E or as egrep) does support Extended
> Regular Expressions, which sed does not.
if you want fancy regular expressions, just use perl (troll ducks for cover!)
;)
People wrote:
> grep? awk? sed?
Or you can just use the simplest tool for the job now, grep, and if your
needs change some day, you can use a different tool. OMFG I had to switch
to a different tool the sky is falling the sky is falling. No seriously.
On Tue, Feb 12, 2013 at 16:40:55 +0100, Andreas Amann wrote:
> the ids of visible windows is stored in the _NET_CLIENT_LIST property of the
> root window and can be accessed with "xprop -root _NET_CLIENT_LIST"
>
> The followning script lets you select one with dmenu and then focus it:
Thank you f
* markus schnalke 2013-02-12 16:39
> The following is NOT portable:
>
> > sed -E 's/\s\+// ; /"(vim|surf):"/d'
>
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
>
> If you want sed with Extended Regular Expressions, take awk. :-)
For the particular case of emulating these m
On Tue, Feb 12, 2013 at 10:36:27AM +0100, Thomas Dean wrote:
> all the unwanted windows in the list. See the attached scripts. Does anyone
> know a solution for this? Is there an existing tool that lists all
> "visible" windows along with their id?
>
the ids of visible windows is stored in the _
[2013-02-12 14:27] Truls Becken
> On 2013-02-12, at 13:22, Chris Down wrote:
>
> > Considering he's already doing rudimentary filtering through in *addition*
> > to sed calls, awk is more generalisable choice to the problem set.
>
> Alternatively, you could say that sed is the more generalisable
On 2013-02-12, at 13:22, Chris Down wrote:
> Considering he's already doing rudimentary filtering through in *addition*
> to sed calls, awk is more generalisable choice to the problem set.
Alternatively, you could say that sed is the more generalisable choice since
grep is pretty much a subset of
What I've been doing for a bit is using a modified version of lsw + xdotool:
~/bin $ cat dwm-xdo-focus
#!/bin/sh
TMPFILE=$HOME/.tmp/dwm-lastwindow
xdotool getwindowfocus > $TMPFILE
xdotool windowactivate $1
diff -r e86225980f5d lsw.c
--- a/lsw.c Sat Jun 18 18:47:03 2011 +0100
+++ b/lsw.c
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 F
On Tue, Feb 12, 2013 at 10:39 AM, Chris Down 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 singl
On Tue, Feb 12, 2013 at 11:07:52 +0100, Michał Kazior wrote:
> You might consider using lsw (http://tools.suckless.org/lsw).
Excellent! I think I tried it earlier, but it did not list the window id's
back then. Now it does the job perfectly, thanks!
You might consider using lsw (http://tools.suckless.org/lsw).
-- Michal.
Yes, my solution is very ad hoc, I'm sure it can be improved in many ways.
But I'm looking for something that avoids the problem to begin with.
On Tue, Feb 12, 2013 at 17:39:30 +0800, Chris Down wrote:
> Just a comment on your method rather than your problem, calling ''grep''
> that many times thr
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
O
I often have many windows open (mostly with pdf files I need to read), and
try to come up with a tool that lets me find and focus a window easily. I
now simply list all windows with xwininfo and feed that to dmenu. But the
list is full of invisible/dummy windows I don't care about. I clean the
list
18 matches
Mail list logo