[ale] sed and massively editing files.

Michael B. Trausch fd0man at gmail.com
Mon Nov 13 18:54:12 EST 2006


On Mon, 2006-11-13 at 10:02 -0500, Hunter Eidson wrote:

> I'm sure there's a prettier way to do it, but this seems to work...
> 
> Create a file called fixup.sed which contains these 3 lines:
> 
> :START
> s/{\(.*\)'\(.*\)}/{\1\"\2}/g
> t START
> 
> Now, assuming your data file is datafile.sql, you should be able to run:
> 
> sed -f fixup.sed < datafile.sql > new_datafile.sql
> 
> Hope this helps...
> 


Wow, this helped big-time.  I don't quite understand it (yet), but it
worked!

I am still working on reading "sed & awk," but I haven't gotten to
anything but simplistic stuff that I'd mostly figured out.  Nonetheless,
I am reading it from front to back... :-)

Thanks again!

    -- Mike

--
Michael B. Trausch
                    fd0man at gmail.com
Phone: (404) 592-5746
   Jabber IM: fd0man at livejournal.com

Demand Freedom!  Use open and free protocols, standards, and software!
-------------- next part --------------
An HTML attachment was scrubbed...




More information about the Ale mailing list