On Tue, Aug 03, 2010 at 12:58:34PM -0700, Chip Camden wrote:
> > 
> > I not that great in programming so writing a ruby or shell script do do 
> > this would take me weeks:-(
> 
> Well, I'd use Ruby.  Read the whole file into a string and find the
> relevant bits with Regexp.

I'd say either Perl or Ruby is the way to go in this case, because of
regular expression support and the nifty functions/methods you can use
with them (e.g. Perl's map and Ruby's collect), depending on which of
them best suits your way of thinking.  Using shell scripts would, I
think, be a bit more of an arcane exercise for someone relatively new to
coding, given the assumption that you're going to use regexen as the
workhorse.

Another nice tool for this sort of thing, in both languages, is the split
function/method.

Unfortunately, nothing comes immediately to mind that wouldn't involve
writing some code -- so if it would take you weeks to write code to do
the work for you, I guess you're stuck with taking weeks to do it, unless
you want to just do it all by hand.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

Attachment: pgpWRNlZVVOq3.pgp
Description: PGP signature

Reply via email to