I currently have an SQL file filled with insert statements in the form:
INSERT INTO database.table(primary_key, foreign_key, url_one, url_two, int_one, int_two, int_three) VALUES (266,7,https://some.url.com/image_one.png,https://some.url.com/image_two.png,266,1440,900);
I've now realised that the URL strings will need quotation marks around them before I can execute them in MySQL. What command can I use to place quotation marks around the URL string?
I tried to use 'sed' to do it but I couldn't get the command right as I don't completely know the syntax of what I want to achieve:
sed -e "s/(https://).*(\.png)/\"(https://)$1(.png)\"/g" some_sql_file.sql
Running this results in:
sed: -e expression #1, char 12:
unknown option to `s'
Any help would be much appreciated as I want to avoid regenerating the SQL file just to put in the quotation marks if at all possible.