glenn jackman

Ottawa, Canada

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

6h
answered Should I be adding aliases to /etc/profile instead of /etc/basrhc?
7h
comment randomly selecting rows with header intact
@Ssank, I'm curious: was it my first answer or the second that was most helpful?
8h
comment randomly selecting rows with header intact
It's not crystal clear to me that the OP wants the header and then 499 or 500 lines.
8h
revised randomly selecting rows with header intact
added 917 characters in body
9h
answered randomly selecting rows with header intact
9h
comment Split a string in shell scripting explaination
in zsh echo ${line##*=} does not display any single quotes for me. You must have been doing something different.
9h
revised Split a string in shell scripting explaination
edited tags
9h
comment TCL script only saves the bottom half of the output
Does your computer have less than 16kb of memory? My code should write to the file in 16kb chunks
16h
comment Split a string in shell scripting explaination
and ${line##*=} is sufficient: the single quotes are removed by the shell, so they are not part of the value in $line
16h
comment Split a string in shell scripting explaination
What shell? bash: ${${${line##*=}#"'"}%"'"}: bad substitution
16h
comment pipe/consume STDOUT as single string rather than sequence of whitespace separated words
bash also lets you use set -H/set +H to enable/disable history expansion.
16h
answered TCL script only saves the bottom half of the output
1d
answered How to store a line from expect_out(buffer) to a variable in tcl
1d
answered Linux shell script, differences between two directories
1d
answered Simple Bash Script: Change names of files to mimic directories
1d
comment Merge files with AWK while adding separators before and after
Agreed. If the start/end separators are fairly "dumb", you could replace cat with awk in the for-loop
1d
answered Merge files with AWK while adding separators before and after
1d
answered sed: How to delete second match in a file
1d
revised parsing csv file and generate a output file using python
edited tags
1d
comment How to insert a new record(row or line) after the last line of input file using awk?
Extending Thomas's hint, use print
1 2 3 4 5