19,317 reputation
1743
bio website
location Ottawa, Canada
age
visits member for 3 years, 11 months
seen 16 hours ago

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


2d
answered How do I use a function return as a condition of an if else then shortcut?
2d
comment Loop over associative arrays by substring
You cannot, but I've posted an alternative
2d
revised Loop over associative arrays by substring
added 1173 characters in body
Jan
29
comment Loop over associative arrays by substring
Good suggestion to look for another language: pick the right tool for the job.
Jan
29
answered Loop over associative arrays by substring
Jan
29
comment How do I securely download files in shell scripting?
sftp or scp or rsync -- all use ssh keys
Jan
28
comment Why does the printf statement in this loop output the array out of sequence?
Associative arrays have no inherent order. The insertion order is not preserved.
Jan
27
answered Insert space at specified position in a file
Jan
26
comment How do I reuse the last output from the command line?
@Aerovistae, the quotes are required if you don't know where the value comes from:
Jan
24
revised Get all the records from a file with Date collumn less than a month
edited body
Jan
24
answered Get all the records from a file with Date collumn less than a month
Jan
23
answered Why does this comparison return not equal?
Jan
23
comment BASH: Command not running, special character '�' suddenly appeared (Ubuntu)
When I type that in, bash tells me: bash: $'\303\261s': command not found, but ls continues to work normally. You might want to experiment with the builtin hash command: hash -l and hash -r
Jan
23
comment Equivalent of Java's String.getBytes() in Unix Shell (Cygwin)
Question duplicated from stackoverflow.com/q/28112029/7552
Jan
22
answered How to get index value from list in tcl?
Jan
21
revised script to parse integer and convert it to char code
added 179 characters in body
Jan
21
answered script to parse integer and convert it to char code
Jan
21
comment Compare two Arrays in KSH and output the difference
Take care: you need the [@] for the for loop, and [*] in the if condition. Beyond this, add an update to your question with the exact code you're using and a minimal example.
Jan
21
comment Compare two Arrays in KSH and output the difference
I wouldn't have thought so, but I guess the double brackets do some magical things. You can see how the two array expansions differ: print ">%s<\n" " ${dsmArray[*]} " versus print ">%s<\n" " ${dsmArray[@]} "
Jan
21
comment Delete last character of last item in a bash array
This sounds like an XY problem. However, sed 's/.}$/}/' <<< "$Array"