Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Split jsonl file by line with 10000+ lines and rename files
#!/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