<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I am dealing with very large text files (a few million lines) and would like to check and modify them according to a well defined format. The format requires ONLY ONE NEWLINE (followed by some sort of text) on top of the file and NO NEWLINE in the very end. The input files can be very diverse, such as one file may have 2 newlines on top and none in the end or other may not have a newline on top and 5 in the end. </DIV>
<DIV> </DIV>
<DIV>The aim is to check these files & introduce JUST ONE NEWLINE in the TOP and NO NEWLINE in the BOTTOM.</DIV>
<DIV> </DIV>
<DIV>Any pointers will be appreciated.</DIV>
<DIV> </DIV>
<DIV>Thanks,<BR>DS.</DIV>
<DIV> </DIV></div><br>
</body></html>