title: How to check if a file have been complete and reach to EOF?
body: <p>My collaborator was processing a large batch of files, but some of the output files seem to be interrupted before they were completed. It seems that these incomplete files do not have the end of the file character (EOF). I would like to do a script in batch to loop through all of these files and check if the EOF character is there for every one of the ~500 files. Can you give me any idea of how to do this? Which command can I use to know if a file has EOF character at the end?</p>
  
  <p>I am not sure if there is supposed to be a special character at the end of the files when they are complete, but normal files looks like this</p>
  
  <pre><code>my_user$ tail CHSA0011.fastq
  +
  BBBBBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
  @HS40_15367:8:1106:6878:29640/2
  TGATCCATCGTGATGTCTTATTTAAGGGGAACGTGTGGGCTATTTAGGCTTTATGACCCTGAAGTAGGAACCAGA
  +
  BBBBBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
  @HS40_15367:8:1202:14585:48098/1
  TGATCCATCGTGATGTCTTATTTAAGGGGAACGTGTGGGCTATTTAGGCTTTATGACCCTGAAGTAGGAACCAGA
  +
  BBBBBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
  my_user$
  </code></pre>
  
  <p>But when I do <code>tail</code> tho thse interrupted files they look like:</p>
  
  <pre><code>my_user$ tail IST-MES1.fastq
  @HS19_13305:3:1115:13001:3380/2
  GTGGAGACGAGGTTTCACCATGTTGGCCAGGCTGGTCTCGAGCTCCTGACCTCAAGTGATCCGTCTGCCTTGGCC
  +
  @B@FFFFFHHHHFHHIJJJJJIIJJJJJJJIJJJJGIIJJGIIGIIJJJJFDHHIJFHGIGHIHHHFFFFFFEEE
  @HS19_13305:3:1106:5551:75750/2
  CGAGGTTTCACCATGTTGGCCAGGCTGGTCTCGAGCTCCTGACCTCAAGTGATCCGTCTGCCTTGGCCCCCCAAA
  +
  CCCFFADFHHHHHJJIJJJJJJJJJJJJEGGIJGGHIIJIIIIIIJJJJDEGGIJJJGIIIJJIJJJHHHFDDDD
  @HS19_13305:3:2110:17731:73616/2
  CGAGGTTTCACCATGTTGGCCAGGCTGmy_user$
  </code></pre>
  
  <p>As you can see, in normal files my_user$ is displayed one line below the end of the file. But in these interrupted ones my_user$ is next to the end of the files. Maybe it just because the file does not end with a line breaker <code>\n</code> ? </p>
  
  <p>I am sorry if the question is a bit confusing,</p>
  
  <p>cheers,
  Guillermo </p>