[Sussex] Updated Grep, Sed and RegExp links from August moot

Fay Zee sussex at eglug.org.uk
Wed Sep 14 22:28:06 UTC 2011


Hi All, this is aimed at those who were at the August moot.

I've updated my analysis file quite a bit and written up the
instructions with notes so you can step through it again whenever you
decide.

I've put it up on the East Grinstead site for download. All the same
tutorial and cheat sheet links are there at the bottom of the page
with notes on how I prepared the practice file, and I've retested the
three commands we focused on.

The text I chose is particularly challenging so provides for more
interesting experimentation. That text, in 1928, would have been typed
up by hand (more than 1000 pages) and then the printing plates for
each of the 16 volumes within it would have been hand set. This would
partly explain why the paragraph indents vary from section to section,
ranging from 2 to 6 characters. There are also a great many bordered
quotes interspersed, which end up as spaced out character strings
floating around haphazardly in the plain text version.

Among other manipulations remaining to be done are the elimination of
extra white space within paragraphs, and here again, the varying
indents limit the accuracy of any one expression - unless you take the
text one section at a time. There are options which let you define
line numbers but that will have to be left as a further challenge. We
didn't even touch on stored scripts.

Anyway, here's the link:
http://www.eglug.org.uk/bash_and_regexp_example_analysis.html

I enjoyed the exercise and I still refer back to the analysis when
crafting additional expressions. Writing it all up prior to the moot
was painstaking as was revisiting it afterwards, but well worth it as
it cemented my understanding. Running (successful) sed commands one
after the other and seeing the results is like magic :-)

Let me know if you give it a go, and please post your feedback.

 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/20110914/0576eb57/attachment.htm>


More information about the Sussex mailing list