Log in

No account? Create an account
12 April 2006 @ 10:44 pm
My headdddd. This is the first time I've had a headache since... oh yeah I had one earlier this year. But still it's not very like me! And boy is it painful! Good thing I have these small tylenol tablets with this nice sweet coating on them.

Back to shell scripting. Anyone know how to switch all instances of "me" and "you" in a string at the same time?!
beauseizure on April 13th, 2006 05:24 pm (UTC)
Probably not the most efficient way, but.

Search through the string looking for instances of "you" or "me" and store their locations in separate arrays, then change all the words referenced by the "you" array to "me," and vice versa.
NrgSpoon: ???nrgspoon on April 13th, 2006 06:14 pm (UTC)
I would probably replace all "you"s with some garbage string like "mjw398r7a", then replace all "me"s with "you"s, finally switch the "mjw398r7a"s to "me"s.
Jeffrey Carl Fadenjeffreyatw on April 13th, 2006 07:06 pm (UTC)
That's exactly what I did. I had the program generate a random integer and put it in the middle of the in-between phrase.
שירן shiranne シラーン 冉施安gogalucky on April 14th, 2006 07:39 am (UTC)
oh man, i was going to suggest it too, but now someone ELSE already did it and YOU already did it and maan, being a jew sucks :( i don't get to comment early enough...
Jeffrey Carl Faden: Gaspjeffreyatw on April 14th, 2006 08:08 am (UTC)
And if you do it in your program, it IS plagiarism and I WILL press charges! Ha ha! Oh man!!!
שירן shiranne シラーン 冉施安gogalucky on April 14th, 2006 08:45 am (UTC)
hey hey mister, by the time i get around to doing my program (totally last minute, i'm SURE) i'll have forgotten this conversation compLETELY!
שירן shiranne シラーン 冉施安: ajikan cover 01gogalucky on April 14th, 2006 08:46 am (UTC)
UNLESS, of course, you manage to make it memorable somehow.

cutefunny picture of doggy or three people in car banging heads sideways now omgomg