[Sussex] Grep evening

Fay Zee sussex at eglug.org.uk
Wed Aug 24 18:18:28 UTC 2011


Hi All

I suggested grep for this month's talk and enough interest has been
shown to give it a go.

It's used a lot with log files, configs, etc.

But just recently, I've been working on some light manuscript
manipulation, post scan - removing page numbers, adding new lines
between paragraphs, rejoining line breaks, removing redundant white
space, identifying and marking section headings and the like.

I solved all these tasks by harnessing grep and sed and the almighty
power of regexp.

Along the way I found an exceptional article [1] by a guy (Peteris
Krumins) who really knows how to research teach the concepts and who
had found and used a excellent tutorial [2] by Bruce Barnett and a
cheat sheet of one-liners [3] by Eric Pement, which Peteris' article
examines in minute detail. Highly beneficial.

Then out of the blue, my manager tossed a folder full of 6 months of
web log files to be filtered and analyzed for a customer. "Just do one
month. Don't spend too long on this!"

Why would I need to? All 6 months in one swoop: easy and fast! I told
him I'd used grep on Linux and he recalled using wingrep [4] long ago.


[1] Famous Sed One-Liners Explained by Peteris Krumins
http://www.catonmat.net/blog/sed-one-liners-explained-part-one/
http://www.catonmat.net/blog/sed-one-liners-explained-part-two/
[2] Sed - An Introduction and Tutorial by Bruce Barnett 
http://www.grymoire.com/Unix/Sed.html
[3] Sed one-liners compiled by Eric Pement
http://www.catonmat.net/blog/wp-content/uploads/2008/09/sed1line.txt
[4] If you need grep on Windows, use the DOS find command or google
for wingrep.

 Best Regards,
Fay
East Grinstead Linux User Group
www.eglug.org.uk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/sussex/attachments/20110824/7208c03a/attachment.htm>


More information about the Sussex mailing list