home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / admin / 6098 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.6 KB  |  42 lines

  1. Newsgroups: comp.unix.admin
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uwm.edu!wupost!gumby!destroyer!sol.ctr.columbia.edu!hamblin.math.byu.edu!news.byu.edu!eff!news.oc.com!convex!tchrist
  3. From: Tom Christiansen <tchrist@convex.COM>
  4. Subject: Re: HELP: ned 'sed' paramters to strip carriage returns from dos text files
  5. Originator: tchrist@pixel.convex.com
  6. Sender: usenet@news.eng.convex.com (news access account)
  7. Message-ID: <1992Nov7.063313.17900@news.eng.convex.com>
  8. Date: Sat, 7 Nov 1992 06:33:13 GMT
  9. Reply-To: tchrist@convex.COM (Tom Christiansen)
  10. References: <Bx8H74.Dpz@news.cso.uiuc.edu>
  11. Nntp-Posting-Host: pixel.convex.com
  12. Organization: Convex Computer Corporation, Colorado Springs, CO
  13. X-Disclaimer: This message was written by a user at CONVEX Computer
  14.               Corp. The opinions expressed are those of the user and
  15.               not necessarily those of CONVEX.
  16. Lines: 24
  17.  
  18. From the keyboard of djr48312@uxa.cso.uiuc.edu (X X):
  19. :I do a lot of transferring of files between dos and unix.  Most of it going from
  20. :the unix to dos direction.  Im going to need to be able to copy a dos text file
  21. :to a unix box and get rid of the '^m' at the end of each line.  A while ago
  22. :someone gave me a sed parameter to do the job.  I need it again.
  23.  
  24.     tr -d '\015'
  25. or
  26.     perl -pe chop
  27.  
  28. work for me.
  29.  
  30. well so does
  31.  
  32.     perl -pe 'tr/\015//d'
  33.  
  34. but chop is faster.
  35.  
  36. --tom
  37. -- 
  38.     Tom Christiansen      tchrist@convex.com      convex!tchrist
  39. It's rural America.  It's where I came from.  We always refer to ourselves
  40. as real America.  Rural America, real America, real, real, America.
  41.         --Vice President Dan Quayle
  42.