vendredi 2 janvier 2015

Need to insert single quotes in text file for use as SQL query using sed


I have created a line of text that looks like this:


INSERT INTO radcheck(id, username, attribute, op, value) VALUES (,,00:23:32:c2:a9:e8,Auth-Type,:=,Accept);


I want to use sed to make it look like this: INSERT INTO radcheck(id, username, attribute, op, value) VALUES (,'','00:23:32:c2:a9:e8','Auth-Type',':=','Accept');


I have tried escaping the ' multiple ways and I am SO close to getting this i feel but need a little help getting it there



Aucun commentaire:

Enregistrer un commentaire