home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / question / 10173 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  1.5 KB

  1. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!mips!darwin.sura.net!haven.umd.edu!purdue!news.cs.indiana.edu!umn.edu!lynx!nmsu.edu!dante!jhall
  2. From: jhall@dante.nmsu.edu (HALL)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: problem with vi..
  5. Message-ID: <1992Aug19.051418.15684@nmsu.edu>
  6. Date: 19 Aug 92 05:14:18 GMT
  7. References: <1992Aug17.155121.21926@njitgw.njit.edu> <2195@fnnews.fnal.gov> <514@alden.UUCP>
  8. Sender: usenet@nmsu.edu
  9. Organization: New Mexico State University, Las Cruces, NM
  10. Lines: 31
  11.  
  12. >|>|> Dear netters,
  13. >|>|>      I have a sparc workstation 2.
  14. >|>|> I mounted the floppy drive and copied few files from the floppy. But
  15. >|>|> when I viewed through vi I happened to see ^M at the end of each line.
  16. >|>|> When I cat the file it looks normal. Will some one tell me the reason
  17. >|>|> for this. If possible please send me a shell script or small c program
  18. >|>|> to remove this. I am enclosing a sample of the file.
  19. >|>|> 
  20. >|>|>     But when I compile the file it works fine. The control characters
  21. >|>|> are really irritating. So help me.
  22. >|>|> 
  23.  
  24.  
  25. { DEleted lots of stuff from people who make stuff really difficult }
  26.  
  27.  
  28. Since you have a sparc workstation I see that you use SunOS.
  29. Dos files do use a different carriage return than the sun.
  30. There is a built in little program to convert this for you....
  31.  
  32. it is called.........
  33.  
  34. dos2unix .....tada......
  35.  
  36. and it goes the other way........unix2dos...
  37.  
  38. there you go I hope it helps...
  39.  
  40. ( I know it is there in 4.1.1 and 4.1.2 )
  41.  
  42. jhall@nmsu.edu
  43.