Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. tail -n +2 fileName.csv | split -l 1000 - split_
  2. for file in split_*
  3. do
  4. head -n 1 fileName.csv > tmp_file
  5. cat $file >> tmp_file
  6. mv -f tmp_file $file
  7. done
  8.  
  9. # Once its done. Change the filename
  10. for i in *; do mv "$i" "$i.csv"; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement