4,015 reputation
513
bio website taz.net.au/blog
location Australia
age 46
visits member for 2 years
seen Apr 4 at 2:25
stats profile views 126

Oct
11
comment Editing output of command as a new command
you can even run fc immediately after history -s $(xsel -op) or print -s $(xsel -op) if you want to edit the command in $EDITOR (vi, nano, whatever).
Oct
11
comment The simplest method to count lines matching specific patterns, including '0' if line is not found?
+1, nice answer. you can use grep's -h or --no-filename option to stop grep from printing filenames. e.g. grep -h -o -f patterns.in logfile.txt patterns.in sort | uniq -c | awk '{print($1 - 1" "$2)}'
Oct
11
comment The simplest method to count lines matching specific patterns, including '0' if line is not found?
BTW, you might need grep's -o option otherwise multiple lines that, e.g., contain 'aaaa' plus other (different) data will be treated as non-unique by the sort | uniq -c
Oct
11
comment What is the difference between grep -e and grep -E option?
the functionality is the same between basic and extended but the syntax is slightly different. regexp special chars like (, ), | etc need to be backslash-escaped to have their special meaning in basic regexp, but not in extended (where they need to be escaped to be treated as a string literal)
Oct
10
comment Spreading stdin to parallel processes
why are you using -l 1 in the parallel args? IIRC, that tells parallel to process one line of input per job (i.e. one filename per fork of myjob, so lots of startup overhead).
Oct
9
answered Is there an equivalent of calling the built-in python function help('topics') but in bash?
Oct
8
revised How do you configure the MTU for all network adapters via a script?
added 91 characters in body
Oct
8
answered How do you configure the MTU for all network adapters via a script?
Oct
7
comment Getting newer version of GEOS than what is available in Debian repositories
Versioned dependency resolution is a feature, not a bug. BTW, more fine-grained control over what apt installs can be achieved with apt's pinning feature...but setting the default release is good enough for many use-cases.
Oct
7
revised what is wrong with my simple choice menu script?
corrected 2 small typos/spelling mistakes
Oct
7
comment Getting newer version of GEOS than what is available in Debian repositories
Not if you only add the wheezy source repositories. Or you can add the binary repos but configure apt to use squeeze by default by adding APT::Default-Release "squeeze"; to /etc/apt/apt.conf or to a file in /etc/apt/apt.conf.d/
Oct
6
comment cd ~ works in one terminal session but not another (no error reported)
csh and tcsh use $home (lowercase).
Oct
6
answered cd ~ works in one terminal session but not another (no error reported)
Oct
6
answered Using a APC Smart-UPS to shutdown a Ubuntu Server Cluster
Oct
6
comment mutt responsive way to refresh inbox
Some imap servers have agressive timeout settings and will drop the connection if you spend more than a minute or so reading (or replying) to an email. I ran into this issue with the Exchange server at work and ended up giving up on using mutt as an imap client...used fetchmail (using procmail as mda) instead.
Oct
6
comment mutt responsive way to refresh inbox
sorry, i don't understand the question. what do you mean by "run this as a simple command"?
Oct
6
comment How to restore default group/user ownership of all files under /var?
True, but dpkg -S is slow (which is why i wrote dlocate). Good point about dpkg-statoverride, though....and the output format is perfect.
Oct
5
comment Do you feel strongly about using package managers vs. installing manually?
@ultra: debian not only has good package-management tools, it also has well-defined and documented policies saying how things should and should not be done. the latter tends to discourage maintainers from making mediocre or bad packages. Fedora only has good package-management tools (dpkg and rpm are roughly as good as each other, with some relatively minor pluses and minuses for each)...it doesn't have the strict enforcement of policies. Third-party packages can be even worse, proprietary pkgs are usually awful in my experience.
Oct
5
answered mutt responsive way to refresh inbox
Oct
5
answered How to restore default group/user ownership of all files under /var?