- 论坛徽章:
- 0
|
测试结果:
$sed 's/^/INSERT INTO table_name VALUES(/; s/\x7f./,/g; s/$/);/' test.txt
INSERT INTO table_name VALUES(15304乛呧紖殴吷靽簵1乛74543184-1乛2014.乛20140430);
INSERT INTO table_name VALUES(19051乛呧紖殴吷靽簵2乛79247030乛2014.乛20140430);
INSERT INTO table_name VALUES(18386乛呧紖殴吷靽簵3乛16664083-3乛2014.乛20140515);
INSERT INTO table_name VALUES(22283乛呧紖殴吷靽簵4乛66731611-8乛2014.乛20140526);
INSERT INTO table_name VALUES(16616乛呧紖殴吷靽簵5乛73952011-9乛2013.乛20131021);
INSERT INTO table_name VALUES(15627乛呧紖殴吷靽簵6乛73637776-7乛2014.乛20140319);
INSERT INTO table_name VALUES(20727乛呧紖殴吷靽簵7乛7931258-3乛2014.乛20140526);
INSERT INTO table_name VALUES(17907乛呧紖殴吷靽簵8乛21440016-5乛2013.乛20130926);
INSERT INTO table_name VALUES(17778乛呧紖殴吷靽簵9乛79670089-6乛2013.乛20130819);
INSERT INTO table_name VALUES(19615乛呧紖殴吷靽簵10乛520000000027994乛2013.乛20130715);
INSERT INTO table_name VALUES(19584乛呧紖殴吷靽簵11乛75150549-9乛2013.乛20130703);
INSERT INTO table_name VALUES(25226乛呧紖殴吷靽簵12乛乛2014.乛20140701);
INSERT INTO table_name VALUES(22227乛呧紖殴吷靽簵13乛79914821-6乛2014.乛2014022 ;
INSERT INTO table_name VALUES(17090乛呧紖殴吷靽簵14乛72442811-7乛2013.乛2013082 ;
INSERT INTO table_name VALUES(17753乛呧紖殴吷靽簵15乛70219691-7乛2013.乛20130314);
INSERT INTO table_name VALUES(18513乛呧紖殴吷靽簵16乛74241519-2乛2014.乛20140607);
咋没有将^替换为逗号?奇怪 |
|