Created
February 27, 2019 11:37
-
-
Save lambdamusic/50c8b92f8df8314b188b41c7fa4fc72b to your computer and use it in GitHub Desktop.
Split jsonl file by line with 10000+ lines and rename files
This file contains 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 | |
FILENAME=records_111901_00000000.jsonl | |
split -a 5 -l 1 $FILENAME temp | |
n=1 | |
for f in temp* | |
do | |
cat $f >> Part${n}.json | |
rm $f | |
((n++)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment