4,474 reputation
11222
bio website keith-s-thompson.github.com
location San Diego, CA
age 54
visits member for 2 years, 10 months
seen Jul 18 at 21:38

I'm a programmer and all-around nerd living in San Diego, California and working at JetHead Development Inc.

E-mail: Keith.S.Thompson@gmail.com


Mar
1
comment Using sed to get rid of characters < > ,
@userunknown: Yes, thanks for the correction.
Mar
1
revised curl --resolve appears to do nothing
Formatting
Mar
1
suggested suggested edit on curl --resolve appears to do nothing
Mar
1
answered curl --resolve appears to do nothing
Mar
1
comment Using sed to get rid of characters < > ,
A fair point. On the other hand, | is also often a meta-character, used for alternation in some regexp syntaxes (though sed in particular needs \| for that). Personally, if I need to deal with literal / characters, I usually use , as the delimiter.
Feb
29
comment Using sed to get rid of characters < > ,
@srikanthradix: That doesn't remove those characters, is replaces them with spaces. You want tr -d '<>,' '' (as in Chris Down's answer).
Feb
29
comment Using sed to get rid of characters < > ,
Correct, but I personally find the use of | as a delimiter a bit confusing. sed 's/[<>]//g' is a bit easier to read.
Feb
29
comment Using sed to get rid of characters < > ,
@Iman: Please consider editing your answer.
Feb
29
comment “Swap file xxx already exists” when editing apache configuration file in vim?
If there were unsaved changes, you can recover them using vi -r (or vim -r if you prefer). I usually write the recovered file to a temporary file and diff it against the main file. (I don't quite trust the recovery not to lose information.)
Feb
29
comment Why does dd from /dev/random give different file sizes?
See also this question.
Feb
24
comment When do you need 'nohup' if you're already forking using '&'?
There's nothing special about emacs. A shell typically sends SIGHUP to its child processes when the shell itself receives SIGHUP, not when the shell exits normally. bash has an option huponexit that causes it to send SIGHUP to children when it exits, but it's not enabled by default. gnu.org/software/bash/manual/bashref.html#Signals
Feb
22
revised Why does a=0; let a++ return exit code 1?
A perhaps clearer illustration
Feb
22
suggested suggested edit on Why does a=0; let a++ return exit code 1?
Feb
20
comment Replace yum with apt
... unless you what?
Feb
19
comment How to find bash in a portable way
But this method does have some drawbacks; see this question and this answer. Most systems are going to install bash as /bin/bash (via a symlink if necessary) simply because so many scripts out there have #!/bin/bash.
Feb
17
comment Will tar -cvzf packed.tar.gz mydir take hidden files into account?
@JVerstry: Good point. A suggestion, though; a question like "I tried this, and it worked; is it guaranteed?" would have been even better.
Feb
17
answered Will tar -cvzf packed.tar.gz mydir take hidden files into account?
Feb
17
comment How to add a newline to the end of a file?
@yuyichao: The "" isn't necessary for bash, but I've seen echo implementations that print nothing when invoked without arguments (though none of the ones I can find now do this). echo "" >> noeol-file is probably slightly more robust. printf "\n" >> noeol-file is even more so.
Feb
15
revised Crontab Change location
added 366 characters in body
Feb
15
answered Crontab Change location