glenn jackman

Ottawa, Canada

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

4h
comment How to replace a string if double condition matches
2nd one preferred: will match xyz abc bbb -- the 1st won't
4h
comment Expressing tail through a variable
The default output field separator is a space already, so {print $2, $3, $4} is a little tidier
4h
comment How to print the remaining columns using awk?
True. Still, lipstick on a pig.
4h
revised How to print the remaining columns using awk?
added 309 characters in body
4h
answered How to print the remaining columns using awk?
8h
comment How to modify period between two dates
Please read [ask]
10h
awarded Yearling
11h
awarded Yearling
11h
comment How do I use sed to change },{"Foo" to }\n{"Foo"?
I'd recommend an actual JSON parser: jq . <INPUT >OUTPUT will prettify your JSON
15h
comment Bash - Use different variables in one while loop or better use for loop?
No problem. Just remember for the next time that "doesn't work" is not a useful problem description. Tell us what does happen
16h
comment Bash - Use different variables in one while loop or better use for loop?
What do you have in $IFS?
17h
comment Bash - Use different variables in one while loop or better use for loop?
I think you're saying that you don't see any output from the echo commands inside the while loop. Well, you do enclose the contents of the while loop in an if statement: is $Filelocation empty? Between the while and that first if, put echo "$GI - $TI" -- do you see that output? Do those variables hold the expected values?
17h
comment Delete folders whose name has 4 digit numbers two times
@123, for future reference, OSX man pages: developer.apple.com/library/mac/documentation/Darwin/Reference/…
17h
comment Bash - Use different variables in one while loop or better use for loop?
So... what about that "doesn't work"?
18h
comment Bash - Use different variables in one while loop or better use for loop?
What do you mean "no variables were created" -- how do you know? You're not printing anything
1d
comment Comparing original & backup folder, then deleting non-existing files
Already asked on SO: stackoverflow.com/q/35301757/7552
1d
answered Expect script to handle RSA finger print keys
1d
comment Print only unique lines from file not the duplicates
This does not address the requirements of the question.
1d
comment How to make shell script restart Java if any thread crashes?
Extra +1 for the 2nd part of the answer.
1d
answered Bash - Use different variables in one while loop or better use for loop?
1 2 3 4 5