i have a sql file that hava also lines like :

COMMENT " xxxx " , field f2 \n

in console with this grep/sed can sustituye multilines or single lines

sed -ne '/comment/{:;/\o47;\s*$/!{N;b};s/\n\s*/ /;p}' <file

but i need tho detect at the end of the COMMENT the ", secuence to
sustitute to "*/"

my target objetive it parse a text/line like this:

 fiel1 TEXT COMMENT "coment fiel1" , field2 TEXT, fiel3 TEXT
 fiel4 NUMBER(10,2), fiel5 TEXT COMMENT "pepepeep",
 fiel6 TEXT

into this:

 fiel1 TEXT /* coment fiel1*/ , field2 TEXT, fiel3 TEXT
 fiel4 NUMBER(10,2), fiel5 TEXT /*pepepeep*/,
 fiel6 TEXT

please help, its fine with REPLACE() but not always the secuence ' ", '
will be in same order/sapces combination, maybe could be ' "     , ' or
with new line

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to