Wednesday, August 24, 2005

A Cool Piece of Code

Can any of you figure out what this single line of code does?
for vari in `cat file1`; do curl $vari | grep "comments</a>"| cut -b 213- | awk '{s+=$1} END {print "Total: " s}' >> file2; done
Hint - file1 looks like this:
http://becauseichooseto.blogspot.com/
http://enterthenerd.blogspot.com/
http://randomness976.blogspot.com/
and file2 looks like this:
Total: 71
Total: 96
Total: 20
Well, anybody? Come on Cody, you should be able to get this.

5 Comments:

At Wed Aug 24, 07:34:00 PM , Anonymous Anonymous said...

it counts responses to diferent blogs of Scotar0007 and randomnesss976 and ewe

 
At Wed Aug 24, 08:18:00 PM , Blogger Eric said...

Yup. Anonymous, who are you?

 
At Fri Aug 26, 02:33:00 PM , Blogger Eric said...

Hello Liz. Thank you for being polite to me. I'm sorry... I didn't even notice the address there. Removing it would of course be the gentlemanly thing to do, but it would have been nice if Carmi had talked to me instead of calling the cops on me. But I don't want to debate that again. I have removed the email address. Sometimes you don't need to force people to do anything; you just need to ask nicely.

 
At Fri Aug 26, 02:34:00 PM , Blogger Eric said...

Oh, and can you ask Carmi how she liked the book "Watchers" for me?

 
At Sat Aug 27, 10:41:00 AM , Blogger Eric said...

Thanks.

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home