Unix Wiki
Advertisement
  1. See if the file has the problem
tail -1c FileName.ext | wc -l

A file with an incomplete last line will report a 0 as the answer

  1. Fix the file
echo >> FileName.ext

Voilá! Your file is now fixed!

Advertisement