Thanks to davorg and graff..both oneliners worked..actually this one liner has to remove all \r in file and add \n at the end of file....somefiles comes with \n at end of file and somefiles with no \n...this oneliner should check to see if there is any \r and add \n at eof.