Hi, all --

I have some database sql dumps that look like

  insert into table (f1,f2,f3) values (v1a,v2a,v3a),(v1b,v2b,v3b),...

where of course the insert lines are whopping long.  I would like to
break these lines at the commas like

  insert into table (f1,f2,f3) values (v1a,v2a,v3a),
  (v1b,v2b,v3b),
  ...

(and in fact split after 'values ' but that will just be an exercise on
the first solution) but can't figure out how to spit out the newline.
This *should* be a quick oneliner like

  cat file | perl -ew ' ... ' > file.mod

but I just can't get it :-)


TIA & HAND

:-D
-- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to