I am trying to split a 4GB SQL file into smaller files so that I can import them one by one to reduce errors.
Each INSERT
statement starts on a new line and is preceded by );
I have tried using split -p \0\;INSERT
but this does not work.
I have read about csplit
however I am still unssure as to what RegularExpression is needed.
There are 117 tables across the 4GB of data.
A sample INSERT
statement is as follows:
INSERT INTO 'puid' VALUES (2196534,'ee1d9e3f-b3ae-e36b-cfea-2499a18bd86e',163);
INSERT INTO 'puid' VALUES (2196535,'e2c05e1c-73bd-cdc7-0bab-610b6afe4bd7',163);