320 reputation
316
bio website
location
age
visits member for 2 years, 1 month
seen 5 hours ago

Shyy erny anzr - Naqernf Rvonpu


Oct
14
comment Openbox: disable Alt-F4 on per application basis
I know that, but it always looks like playing the wise guy with such minor typo fixes. :) I normally only do that with bigger issues: bad layout,. bad grouping etc.
Oct
12
comment Modify the right click options when clicking a desktop icon
Gilles asked about both your desktop environment (e. g. LXDE, Unity...) and your window manager (e. g. xfwm4, openbox). It must be noted that with modern Linux distros, these are usually combined as one (arbitrary) pair of (DE, WM). For instance, LXDE normally uses openbox as window manager.
Oct
12
comment What's stealing my F11 key?
OK, let me get out my crystal ball again ... Presumably due to logging in graphically openbox was still active in the system and was in reality not restarted with your new settings. This would have been done by openbox --restart, which you can even launch from console when on LXDE "live." (as regular user!) Might save you from the trouble to reboot or even power-cycle the machine with such minor changes.
Oct
7
comment Is no caching mode page a serious error?
This also happens when a USB pen drive is used. Why this silly message would appear at all with flash drives escapes me, though. A simple fork that suppresses this message when the device is a USB memory stick would do the trick, but of course, this would be too easy.
Sep
28
comment Plotting data from a text file on the desktop
Oh, conky is a very good approach, however only if you know about LUA scripting. You might want to check out the forum at crunchbang.org , where some utter wizards have managed to get diagrams displayed on conky. Note that this will absolutely require conky to be compiled with the cairo bindings since cairo will be responsible for all the graphical stuff. Perhaps you could go cutting and pasting some sample code snippets from there and advance in your "quest" that way?
Sep
15
comment Trying to access environment variable (array) declared in ~/.profile from shell script
I don’t understand why you view this as a hardship. Because the script might be called repeatedly in short intervals. And hence I thought it would be a nice idea to have an array pre-built which can then be used by all subsequent script calls.
Sep
10
comment awk: Extracting a fixed number of rows where the last row number may vary
Speaking of which, some regex engines even do use angle brackets for word boundary matching :) (however they won't work in either awk or gawk) ... Anyways, I think it'll be worth working on a solution that will simulate word boundary on non-GNU awk, since the blind following of GNUisms has almost become epidemic on SE/SO, and thus one of my pet peeves as well.
Sep
10
comment awk: Extracting a fixed number of rows where the last row number may vary
Caveat: Make sure you keep in mind that a \b in GNU awk (gawk) will stand for backspace, so to work correctly, the regex in my OP must be changed to / \ytop\y$/, with \y` standing for "word boundar y". This has just cost me another 15 minutes to figure out, since my regex made top keep on spitting out itself all the same, although I was sure I had filtered it out by now....BUT: this is a GNU-ism; it's not available in traditional awk implementations (neither is \b).
Sep
10
comment awk: Extracting a fixed number of rows where the last row number may vary
@G-Man Well, top displays the stuff pre-sorted already, whilst with ps you'd normally have to pipe a sort to the line to achieve the same. Unless you know about the --sort option in ps, which I had ignored...
Sep
9
comment awk: Extracting a fixed number of rows where the last row number may vary
Thank you! That might already be the solution. And I have nothing against your italics, for it leaves those who ask a little chance to think themselves. :) I'd always just need these general ideas, not everything word-by-word. BTW, about the count=5 bit: very sneaky! I was trying so hard with for loops, but got nowhere (except for silly output as well as annoying and totally confusing error messages from awk)
Sep
9
comment awk: Extracting a fixed number of rows where the last row number may vary
Very nice alternate solution as well, thanks! Might even take less resources than the top approach.
Sep
1
comment wget: Retrieving a list of URLs when modifying input data file on the fly
Well, the basic problem is that there were two very useful comments which ought to have been posted as answers. However I guess this has been done on purpose, because both of the commenters were not entirely sure since they could not "live-test" it at the moment they posted it. So both of them or just one may turn theirs into an answer, and I'll put the checkmark on it. But not on my own one, that's silly.
Sep
1
comment wget: Retrieving a list of URLs when modifying input data file on the fly
@garethTheRed You're a marvel. Doing them in this order works. Thank you very much. But thanks as well to Mark for the alternate solution, which works if you use wget -nc -i <(cut -f1 -d' ' inp). No dollars here. :)
Aug
30
comment Use find to find certain directory and delete all files in it except one directory
Yes I agree it IS better than the great part of the other Bash PF articles. (I never link you to any pointless crap, mind you :)) And thanks for the link.
Aug
30
comment Use find to find certain directory and delete all files in it except one directory
Well, you're the first to complain about me linking it. Seriously. Though not all "tips" might be the creme de la creme, there are lots of neat tricks in there that have helped me many times. Still, I'm no "gregwoo fanboi" - but I wouldn't go as far as daring accuse him of "ignorance" either.
Aug
30
comment Use find to find certain directory and delete all files in it except one directory
Well it was supposed to mean that the first subshell doesn't know anything of the second, if there are two. And so things might give different results as you would expect because both subshells are independent of each other. But you might expect parameters to be "known" to both. (Heck, you even used export, so why doesn't that work?) However, you debug variables and get zero length and other nonsense. YMMV...but since I've avoided cd in scripts and specified paths directly instead, my scripts are less prone to errors. mywiki.wooledge.org/BashPitfalls#cd_.2Ffoo.3B_bar
Aug
30
comment find: Why is the -a operator not commutative in combination with -print?
Looks excellent now in my opinion. Thanks for your agreement on improvement. As you have seen, this stuff is way trickier than it looks at first.-- Lastly, this has now turned a great solution for alias as well. Remember, alias needs the argument at the EOL, and the -print was in the way all the time. Thanks to your marvellous "dummy option" -a -name ., this is now feasible. Fantastic! Thank you.
Aug
30
comment find: Why is the -a operator not commutative in combination with -print?
Well, that's not quite the same. Try it out. "./exclude_me" does get listed once you omit the -print at the end of the line. But I want it both excluded and not even listed at all. Not until you add the explicit -print, however, "exclude_me" will actually be left out of the listing. Trust me, I can try here "live" and I know what I'm talking about :)
Aug
30
comment Use find to find certain directory and delete all files in it except one directory
Well, I think the downvote is fully justified in this case. It always makes my toenails roll up whenever I see cd in a shell script. This will cause nothing but trouble. Think of shell sessions, subshells, subshell A not knowing anything of subshell B and their parameters and vice versa---and so on. Avoid.
Aug
29
comment Why do we use double hyphen in “tar --anchored” and single hyphen in “tar -b”?
@Zeke Ugh! Don't you remind me of that.