Skip to content

Instantly share code, notes, and snippets.

@psenger
Created June 2, 2023 02:59
Show Gist options
  • Save psenger/8932c79e3df4d6ddf3895fc403b585d5 to your computer and use it in GitHub Desktop.
Save psenger/8932c79e3df4d6ddf3895fc403b585d5 to your computer and use it in GitHub Desktop.
[How to split a file based on line numbers] #Unix #MacOS

How to split a file on lines

Use case, you have a csv file, you want it to be split by 100 line numbers into files.. The onlys ide effect is you get sample-aa, sample-ab.... no extension

split -l 100 sample.csv sample-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment