[YLUG] Manipulation of text files... anyone with lots of
experience?
Dan Bishop
dan at viciouslime.co.uk
Mon Jul 28 22:00:56 BST 2008
Thank you so much Nigel! That worked perfectly, you win the pints :D
I'll look into CPAN too. Thanks again, I really can't tell you how much
that's helped me!
Dan
On Mon, 2008-07-28 at 21:37 +0100, Nigel Metheringham wrote:
> On 28 Jul 2008, at 20:49, Dan Bishop wrote:
>
> > Basically, I have
> > read as much as I ever care to read about sed, awk and regular
> > expressions and have hit the point where I don't care how it
> > happens, I
> > just want it to happen.
>
> Its potentially just about doable as a regular expression
> transformation, but frankly it would be a pretty impressive
> transformation. In which case you could express it in sed, its
> definitely doable in awk, but my weapon of choice for this stuff is perl
>
> [And I have this horrid suspicion that if you searched CPAN you might
> find a module that deals with this form of dictionary.]
>
> I've attached a bit of perl that does what you want on the assumption
> that all the definitions are each on a single line (ie that the
> Abenteuerreise definition should have not been split across 2 lines).
>
> If that assumption cannot be supported then you need to have some
> rules defining how lines can be split otherwise it gets really really
> messy.
>
> Nigel.
> --
> [ Nigel Metheringham Nigel.Metheringham at InTechnology.com ]
> [ - Comments in this message are my own and not ITO opinion/policy - ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mailman.lug.org.uk/pipermail/york/attachments/20080728/8277640b/attachment.bin
More information about the York
mailing list