101 reputation
1
bio website ithaca.arpinum.org
location New York, NY
age 46
visits member for 3 years, 8 months
seen Jun 15 at 15:08

Feb
17
comment Quick directory navigation in the terminal
I do pretty much the same thing, but without the export. That way, CDPATH is not exported to scripts with potentially weird or harmful effects. See here for more discussion and examples.
May
8
comment sed regexp for: [111]
@LanceBaynes If that's GNU sed, try -r instead of -E. (Aren't portability issues fun?)
May
8
comment sed regexp for: [111]
Duh, thanks @ennuikiller.
May
8
comment sed regexp for: [111]
I'm not sure if this is a typo or not, but I think you need to escape both the opening [ and the closing ], if you want those literal chars.
May
8
comment sed regexp for: [111]
Do most versions of sed now support {3}? I was going to suggest \[[0-9][0-9][0-9]\], but it would be nicer to be able to just use {3}. A quick follow-up GNU sed supports {3} if you pass the -r flag. I don't think BSD sed does. (At least OSX's sed doesn't seem to.)
Dec
21
awarded  Supporter
Sep
6
comment How can I prepend a tag to the beginning of several files?
If you recommend use of the -i flag without a suffix, please warn readers that this means you get no backup. For a few characters more (-i.bak), you get a backup in case your one-liner includes a typo. A fairly simple typo (say, forgetting the -p flag) can ruin your whole day otherwise.