Last active
April 20, 2016 16:23
-
-
Save unixsam/d2c9ff0a57ac9a78a222 to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| # Change the file name. and the part the file to 1000 lines in each part file. | |
| split -d -l 1000 --additional-suffix=.csv filename.csv files-part- | |
| # Add the heading of the csv file to each parted file. | |
| for file in files-part-*.csv; do | |
| printf '%s\n' 0a file_id,title_text_en,alt_text_en,title_text_ar,alt_text_ar . w | ed -s "$file" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment