6,567 reputation
1723
bio website
location Seattle, WA
age
visits member for 2 years, 6 months
seen Jul 24 at 18:11

I am a computer programmer. Knowledge representation and algorithmic complexity are my main interests.


Feb
28
comment What characters do I need to escape when using sed in a sh script?
Wow, interesting. + isn't special for sed under Mac OS X. But it is special for sed under Linux. My head really hurts now.
Feb
28
comment What characters do I need to escape when using sed in a sh script?
For traditional Unix commands, there are basic regular expressions and extended regular expressions. Details. sed uses basic regular expressions, so the backslashes are needed for group syntax. Perl and Python went beyond even extended regular expressions. While I was poking around I found an extremely informative chart that illustrates what a confusing bramble we conjure up when we glibly say "regular expression."
Feb
28
comment What characters do I need to escape when using sed in a sh script?
The shell isn't touching the parentheses. You need the backslases because sed needs to see them. sed 's/(127\.0\.1\.1)/IP \1/' fails because sed needs to see \( and \) for group syntax, not ( and ).
Feb
28
answered What characters do I need to escape when using sed in a sh script?
Feb
28
answered Tar overwrites read only files
Feb
27
answered linux launch script /etc/init with a specific user
Feb
27
answered Shell script to check server state
Feb
27
answered Is S25mdadm start script priority correct?
Feb
27
comment history list in bash always truncated to 5000 lines at new login
Show us how you setup your prompt in your bash init file.
Feb
25
comment Split a file by line and have control over resulting files extension
The Unix philosophy is to provide you with a set of simple tools that you then combine to do a job. The "conciseness of the bash script" was not a stated requirement in your question.
Feb
25
answered Split a file by line and have control over resulting files extension
Feb
24
answered Removing all spaces, tabs, newlines, etc from a variable?
Feb
24
revised Where to find the source file of function pause(void) and sigsuspend(set)
added 580 characters in body
Feb
24
comment Where to find the source file of function pause(void) and sigsuspend(set)
I've edited the answer to address this question.
Feb
24
answered Where to find the source file of function pause(void) and sigsuspend(set)
Feb
22
answered Awk: check for length of field
Feb
21
comment Shell script executing in the terminal but not from shell script file
Remove the exit 0 from the script. It is telling your shell to exit, which is not what you want.
Feb
21
comment Shell script executing in the terminal but not from shell script file
Set PATH in /etc/profile. This will affect sh, ksh and bash users. /etc/zprofile is the file to use for zsh users.
Feb
21
answered Shell script executing in the terminal but not from shell script file
Feb
20
revised What does the following kernel message mean?
typo fix