20,530 reputation
2145
bio website
location Ottawa, Canada
age
visits member for 4 years, 1 month
seen 40 mins ago

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


31m
revised How to list only the last line of each directory?
added 971 characters in body
52m
comment What is the meaning of read -r ?
A demo: str="a\bc"; read x <<< "$str"; read -r y <<< "$str"; echo "$x"; echo "$y"
12h
comment How to list only the last line of each directory?
Any part in particular?
14h
answered How to list only the last line of each directory?
16h
comment Why won't my python scripts run without the python command when moved from Windows to Linux?
If you're coding on windows, your files may well have windows line endings. Then the shebang line would be #!/usr/bin/python\r and that command cannot be found. Try dos2unix
1d
comment Can 'ssh <host> <command>' be configured to always load server-side startup files?
@calid, simplify your question to "how to transport my environment to a remote ssh session", and then provide an answer with the possibilities. That would be a useful question.
Mar
23
reviewed Approve No Such file or Directory 4
Mar
21
reviewed Approve i don't know what's wrong with the code below. it says 'unexpected end of file'
Mar
20
comment How to delete specific lines within a certain area?
What delimits the "front matter"? can you show more of your YAML file to see what should be kept?
Mar
20
answered Indented here document causes a syntax error
Mar
19
comment BASH base conversion from decimal to hex
@StéphaneChazelas, wait a minute. Are you saying that ksh93 does not fork for x=$(some_builtin) ?
Mar
19
comment BASH base conversion from decimal to hex
Or, use the -v option for the builtin printf: printf -v foo "%d" $((16#BEEF)); echo $foo
Mar
18
comment Updating config files within the script that references them?
ed, sed and perl are all very good at editing files in-place.
Mar
18
comment sum columns based on matching fields
Curious: why did you decide to sort lexically, not numerically?
Mar
18
comment sum columns based on matching fields
or, make $1 $2 as the key.
Mar
18
comment sum columns based on matching fields
If you have GNU awk, use PROCINFO["sorted_in"] = "@ind_num_asc" instead of piping to sort. ref gnu.org/software/gawk/manual/html_node/…
Mar
18
comment sum columns based on matching fields
What about column 1?
Mar
18
awarded  grep
Mar
17
answered Insert new lines with missing values (NA)
Mar
16
awarded  Guru