Elliott C. Back: Technology FTW!

Replace, Grep

Posted in Friends by Elliott Back on May 5th, 2005.

Jean issues a challenge:

[ok, now count up the number of times i used the word "think" in this entry]

I respond:

%perl -p -e s/think/think\n/g; < jean-thinks.txt > jean-thinks2.txt

%grep -c think jean-thinks2.txt
14

This entry was posted on Thursday, May 5th, 2005 at 2:11 am and is tagged with lt, perl. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback.

Viewing 4 Comments

 

Trackbacks

(Trackback URL)

close Reblog this comment
blog comments powered by Disqus