home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / question / 10308 < prev    next >
Encoding:
Text File  |  1992-08-23  |  1.0 KB  |  26 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!math.fu-berlin.de!Sirius.dfn.de!darwin.sura.net!mips!sdd.hp.com!zaphod.mps.ohio-state.edu!uunet.ca!canrem!telly!druid!darcy
  3. From: darcy@druid.uucp (D'Arcy J.M. Cain)
  4. Subject: Re: problem with vi..
  5. Message-ID: <1992Aug23.132141.18218@druid.uucp>
  6. Date: Sun, 23 Aug 1992 13:21:41 GMT
  7. References: <2195@fnnews.fnal.gov> <514@alden.UUCP> <josef.714392567@uranium>
  8. Organization: D'Arcy Cain Consulting
  9. Lines: 15
  10.  
  11. Josef Moellers <mollers.pad@sni.de> writes:
  12. >[ One way to remove ^M's deleted ]
  13. >I usually do ":1,$s/.$//", as the ^M's are the last character on a line.
  14. >This works fine. Then I do "G" and get rid of the ^Z's (e.g. "Gdd").
  15.  
  16. It seems to me that sed is overkill for getting rid of a single character
  17. in a file.  How about:
  18.  
  19.     tr -d '\015'
  20.  
  21. -- 
  22. D'Arcy J.M. Cain (darcy@druid.com)  |
  23. D'Arcy Cain Consulting              |   There's no government
  24. Toronto, Ontario, Canada            |   like no government!
  25. +1 416 424 2871          DoD#0082   |
  26.