[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] sed and massively editing files.
- Subject: [ale] sed and massively editing files.
- From: fd0man at gmail.com (Michael B. Trausch)
- Date: Mon, 13 Nov 2006 18:54:12 -0500
- In-reply-to: <[email protected]>
- References: <1163428060.4675.57.camel@pepper> <[email protected]>
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...