Created
November 14, 2018 21:26
-
-
Save jjrom/3c8335ff9f59f40ef89a3fe5aa82751b to your computer and use it in GitHub Desktop.
Split a large SQL query file with one COPY to a large SQL query file with several COPY (one every 10000 lines)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed '0~10000 s/$/\n\\\.\nCOPY landcover\.landcover \(ogc_fid, wkb_geometry, dn\) FROM stdin\;/g' < itag_landcover.sql > itag_landcover.sql.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment