glenn jackman

Ottawa, Canada

Developer at Pythian.
Big Tcl and Perl fan.
Enjoy Ruby and JavaScript too.

8h
answered .txt File from Mac not converting properly
14h
answered Delete blank columns
14h
comment Linux Check if string exists as separate word
readability tip: if you're using -P, then use \s instead of [[:space:]]
14h
comment Delete blank columns
What is the field separator?
14h
revised Grepping second pattern after matching first pattern
added 137 characters in body
14h
revised Grepping second pattern after matching first pattern
added 137 characters in body
14h
answered Grepping second pattern after matching first pattern
20h
revised Append something to each list in a file
fixed formatting: missing backtick
20h
comment Append something to each list in a file
He's quite right. Because I'm storing the additional values in a simple associative array, I can only store one line for each variable. To be able to store multiple lines, I'd switch to Perl where hash-of-arrays is easy.
1d
comment fish shell -eq and -a in if statement
The only difference is that test is built into shell, so you save having to execute an external command.
1d
revised Append something to each list in a file
added 329 characters in body
1d
answered Append something to each list in a file
1d
comment Linux Install Needed Packages for Executable
where did this "executable" come from?
1d
awarded Nice Answer
1d
comment Make shell prompt wait till all processes complete
@Renny, note that [ is a command in the shell, not just syntax. As a command, you must separate it from other words with whitespace. Take careful note of all the spaces in ShellFish's answer.
1d
comment Best practice to reduce the complexity of the UNIX Shell script
What shell are you using? <<< is a bash redirection operator
1d
comment group characters within square brackets in grep
Note that this \S is upper case. For perl regex, that means "non-whitespace" characters. So \S+Msi\S* is a sequence of non-whitespace chars that contain "Msi". The (?=.*CNAME) part is a "look-ahead" assertion meaning "from my current position in the string, does the pattern match what comes next"
1d
revised Best practice to reduce the complexity of the UNIX Shell script
added 579 characters in body
1d
revised Best practice to reduce the complexity of the UNIX Shell script
added 640 characters in body
1d
comment Best practice to reduce the complexity of the UNIX Shell script
The shell has to spend a lot of time forking for all your calls to "external" commands. If you rewrite in a single language, you save all that work the shell has to do.
1 2 3 4 5