Created
September 10, 2020 04:58
-
-
Save fabito/989c5db84c3ea33f88772b02ab6c34d2 to your computer and use it in GitHub Desktop.
split 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
line_count=$(wc -l $1 | cut -d ' ' -f1) | |
<$1 | sort | split --additional-suffix=".txt" --numeric-suffixes="1" -l $(expr $line_count / $2 + $2 - 1) $1 "set" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment