Split text file in linux with header

tail -n +2 file.txt | split -l 20 - split_
for file in split_*
do
    head -n 1 file.txt > tmp_file
    cat $file >> tmp_file
    mv -f tmp_file $file
done
Advertisements

Get MIT-License

  1. Fork this repo

    https://github.com/remy/mit-license

  2. Create your license json file in users/ Ex. users/phakin.json with content like this

    {
    “copyright”: “Phakin Cheangkrachange”,
    “email”: “phakin.che@gmail.com”,
    “format”: “txt”
    }

    * Have to find a unique file name
    ** Check existing files for more template

  3. Commit & Push to master with message “Create phakin.json”
  4. Create pull request at the main remy‘s repo and wait for approve
  5. Check your license after approve at

    https://phakin.mit-license.org/