Created
March 31, 2015 17:52
-
-
Save sephraim/b76b8383282321353e3c to your computer and use it in GitHub Desktop.
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 | |
# Split a file into N parts | |
# | |
# Each resulting file will have a .ptXX suffix | |
# | |
# Example - split file into 30 parts: | |
# ./parts.sh myfile.txt 30 | |
split -dl$((`wc -l < $1`/$2+1)) $1 $1.pt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment