539 reputation
29
bio website
location
age
visits member for 5 years, 3 months
seen Dec 10 at 22:10

Jan
25
comment How to search for a pattern between lines 1500 to 2500?
I worry about the possibility of false positives in the grep match if I do that. Probably it should be an additional switch. What "line number" means when there are multiple files is also a question.
Jan
25
comment How to search for a pattern between lines 1500 to 2500?
You're all quite right, but just for fun I added an answer using torso. I sidestepped the line number question by pretending that it doesn't exist.
Jan
25
answered How to search for a pattern between lines 1500 to 2500?
Jan
25
comment How to search for a pattern between lines 1500 to 2500?
Though it's more efficient to write this as one script I can't help but thinking that this is a missing tool. As a complement to head and tail, a tool that gives you a specific range of lines or bytes out of the middle of a stream (based on offset from the start). We could call it torso or thorax.
Jan
25
comment find -exec command works on Debian Squeeze but not Ubuntu 10.04
Is the ~/bin/ mentioned exactly the same in both cases? Not just the same file list and contents, but the same underlying device/filesystem?
Jan
20
answered recursive file copy
Jan
20
comment “tar -xzf” for many “tar.gz” files in a directory
I did not omit the z in my example for this reason. There's another reason not to use a leading switch which feeds in to the reason you might omit the z: One less character to type.
Jan
18
answered What are the most effective methods to search duplicate files?
Jan
18
comment “tar -xzf” for many “tar.gz” files in a directory
Other for loops on this page break on spaces and special characters, so I did not vote them up. Their form was correct with simply a small omission. This one breaks that way, too, but does it in a more egregious manner. The output of ls is for human consumption only unless you use -1 or similar, but even then I would avoid it. See ParsingLS.
Jan
18
comment what exactly happens when I “sudo apt-get install php-pear”
I will just mote that as a rule of thumb "If you can install it via a package manager, you should install it via a package manager." You may not see the advantage today but sooner or later you'll appreciate it. That said, only do it if the version available is suitable to your needs. I, personally, install nothing that cannot be installed via APT; everything else is too much work!
Jan
18
revised “tar -xzf” for many “tar.gz” files in a directory
added 24 characters in body
Jan
18
comment “tar -xzf” for many “tar.gz” files in a directory
I would want to include -maxdepth 1 to avoid accidental expansion of tarballs in subdirectories.
Jan
18
comment “tar -xzf” for many “tar.gz” files in a directory
+1 for explaining why this fails
Jan
18
answered “tar -xzf” for many “tar.gz” files in a directory
Jan
18
comment “tar -xzf” for many “tar.gz” files in a directory
-1 for piping the output of ls
Jan
14
comment List/remove files, with filenames containing string that's “more than a month ago”?
Given all of the GNUisms present, including the explicit invocation of bash and the use of non-portable find syntax, I don't think anyone could object to the use of -ot. I would have used this comparison if I had thought about it, but instead I recycled a solution I've used before (when I had GNU find on Windows, but no sh).
Jan
14
awarded  Critic
Jan
13
revised List/remove files, with filenames containing string that's “more than a month ago”?
typo fix
Jan
13
revised List/remove files, with filenames containing string that's “more than a month ago”?
explanatory comments; added 400 characters in body
Jan
13
revised List/remove files, with filenames containing string that's “more than a month ago”?
deleted 21 characters in body; deleted 3 characters in body; added 204 characters in body; added 140 characters in body; added 18 characters in body