So I am running through a directory deriving names to insert into a MySQL database. Some of the names have a single quote ( ). I m using awk
ls *| awk -F=: {print "INSERT into citation_sources (source_name) VALUES (" " " $1 " " ");"}
While I can get the output to appear properly from awk. E.G.:
INSERT into citation_sources (source_name) VALUES ( Black s Law Dictionary, 2nd Edition (Black 1891));
当将数据插入 MySQL I 的时间时, d 想要避免做第二次数据编辑以正确避免使用 < code> 的单引号 。
我为我做这些 在我的腹部错过了什么?