Cleaning the data
Posted by gregster on 12 Jan 2015 in Activity log, Announcements
The data I pushed out of MS SQL is kind of cruft-ey. I'm using some sed commands to clean up:
sed -i '/^-- /d' CGWP_data.sql
sed -i '/^LOCK TABLES/d' CGWP_data.sql
sed -i '/^\/\*\!/d' CGWP_data.sql
sed -i '/^UNLOCK TABLES/d' CGWP_data.sql
sed -i '/^[[:space:]]*$/d' CGWP_data.sql
csplit CGWP_data.sql '/^INSERT INTO/'
the csplit doesn't work properly though. I'll look in to it another day.