4,774 reputation
11424
bio website keith-s-thompson.github.com
location San Diego, CA
age 55
visits member for 3 years
seen 7 hours ago

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

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


Dec
2
comment Cronjob for rebooting everyday
@Michael Kjörling: >& and &> both work in bash; only >& works in csh and tcsh. Since the question uses &>, and csh and tcsh aren't relevent, I've deleted the reference to them.
Dec
2
revised Cronjob for rebooting everyday
`&>` doesn't work in csh and tcsh; remove reference to them.
Nov
23
revised How to conditionally do something if a command succeeded or failed
added 404 characters in body
Nov
21
comment How to pipe the result of a grep search into a new vi file
In fact there's no such thing as a "vi file". vi operates on arbitrary text files; the files themselves are not directly associated with vi. (Or, as I just learned, vi - will cause vi to operate on the contents of stdin; vim does this, but not all versions of vi do.)
Nov
15
comment What are the dangers of creating a normal user with UID < 500?
Debian-derived systems seem to start normal UIDs at 1000, not 500.
Nov
8
comment What do square brackets mean without the “if” on the left?
[ is both a Bash shell builtin and an external command. [[ is only a builtin; in fact type [[ says it's a "shell keyword", unlike [ which is a "shell builtin". (I'm not sure what the real distinction is, though; it seems to be usable as if it were a command.)
Nov
7
comment How to print whole array in tcsh
Hmm. I assumed that set array was an abbreviation of the actual command he used. If he got "word too long", he's obviously setting it to something. Your recent comment on the question is a good one.
Nov
7
comment How to print whole array in tcsh
Ok, but echo "$array" should work perfectly well to print an entire array -- except for the "Word too long" problem, to which printf '%s\n' "$array[-]" is equally vulnerable.
Nov
7
comment How to print whole array in tcsh
How would that address the Word too long error?
Nov
7
comment How to print whole array in tcsh
Also posted on Stack Overflow here.
Oct
17
comment Search for a previous command with the same prefix when I press Up at a shell prompt
Or you might consider switching to bash (I did).
Oct
15
comment What does * next to the file name mean in the output of ls?
@dchirikov: It's merely a duplicate, not a copy. (The word "copy" might imply a copy-and-paste of the exact content.)
Oct
9
awarded  Announcer
Oct
8
comment What is the easiest way to add a string on the beginning of every line of the file from the command line?
@sim: It's bash 3.1.17, at least on the one I'm logged into at the moment.
Oct
8
comment What is the easiest way to add a string on the beginning of every line of the file from the command line?
@slm: "I find it extremely hard to imagine a system that has Bash but not Perl". I have several such systems sitting on my desk. (They happen to be embedded systems.)
Oct
8
comment What is the easiest way to add a string on the beginning of every line of the file from the command line?
I often use $$ (the current shell's process id) as part of a temporary file name; it avoids the effort of thinking of a guaranteed unique name every time: command filename > filename.$$ && mv filename.$$ filename
Oct
8
comment What is the easiest way to add a string on the beginning of every line of the file from the command line?
Strictly speaking, the changes are reflected in a new file with the same name as the original.
Sep
23
revised How to install SUMO on Ubuntu 10.10
Link to SUMO page
Sep
23
comment Wrongly set chmod / 777. Problems?
Did the chmod -R 777 ./ command have to be run as root?
Sep
13
comment How to install SUMO on Ubuntu 10.10
What is "sumo"?