Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Yes, you got it! I am also working with a file with CR-NL, that's the reason. If I remove them, it works. Commented Feb 19, 2014 at 16:57
  • @glenn: Thanks for replying , I copied the sample content in new files and it worked. But the data is large so I have to work with same files. tried to find the suspicious extra character in the file, unable to find . Is there any command which could help to find out the culprit character Commented Feb 20, 2014 at 9:19
  • od -c filename will display the \r prior to the \n Commented Feb 20, 2014 at 12:06
  • @glennjackman : Thanks , I am able to find the character and replaced using tr command, It is working fine now. Commented Feb 24, 2014 at 10:00