glenn jackman

Ottawa, Canada

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

8h
awarded Enlightened
9h
answered Split text file into lines with fixed number of words
10h
comment How to combine files and search the result?
OP wants to be able to provide more than one ID to query.
10h
answered How to combine files and search the result?
10h
comment How to combine files and search the result?
You might want to sprinkle a few newlines in there.
10h
revised How to combine files and search the result?
deleted 167 characters in body; edited title
11h
revised How to combine files and search the result?
deleted 167 characters in body; edited title
11h
awarded Nice Answer
12h
revised Download files with wget. If wget downloads files, move them, otherwise use wget to download different files
deleted 87 characters in body
12h
comment Download files with wget. If wget downloads files, move them, otherwise use wget to download different files
I created a "getfiles" function that is passed one argument (that's the $1). In you code you set $datetime with a 12 or a 18 (I assume that's the hour) -- that's the parameter that gets passed to the function. I didn't see the different pattern, I'll edit my code.
13h
comment Substring extraction in TCL
This assumes that the part you care about does not contain an =
14h
comment Substring extraction in TCL
No delimiters? Wow. You should fix that. If you're sure it's at the end, you can get the text following the last = with set msg [lindex [split $params =] end] or set msg [regsub {.+=} $params ""]
14h
comment Substring extraction in TCL
Your regex can just be {msg=([^&]*)} -- without the trailing &, you can match even if the "msg" argument occurs at the end of the string. To avoid matching "othermsg=something", you can do {(?:^|&)msg=([^&]*)}
14h
answered Substring extraction in TCL
14h
revised use windows batch file to start hbase
added 2 characters in body
14h
comment TCL script to replace C file line
Added updated version that handles brackets in the code
14h
revised TCL script to replace C file line
added 1298 characters in body
15h
comment Running the output of `ssh-agent` in fish; what does `setenv` do?
I recomment changing the grep pattern to '[s]sh-agent' so you don't accidentally match the grep command itself in the ps output.
1d
comment How to append string before and after a line using sed
sed has a grouping construct, so you can write sed '/\[Z\]/ { s/^/<font>; s,$,</font>, }
1d
revised Replacing a "time" column with corresponding values
added 15 characters in body
1 2 3 4 5