home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / admin / 6058 < prev    next >
Encoding:
Text File  |  1992-11-06  |  1002 b   |  31 lines

  1. Newsgroups: comp.unix.admin
  2. Path: sparky!uunet!think.com!ames!elroy.jpl.nasa.gov!ufo!devvax!rouquett
  3. From: rouquett@overcat.jpl (Nicolas Rouquette)
  4. Subject: Re: HELP: ned 'sed' paramters to strip carriage returns from dos text files
  5. In-Reply-To: djr48312@uxa.cso.uiuc.edu's message of 5 Nov 92 08:06:38 GMT
  6. Message-ID: <ROUQUETT.92Nov5103908@overcat.jpl>
  7. Sender: usenet@jpl-devvax.jpl.nasa.gov (For NNTP so rrn will be able to post)
  8. Nntp-Posting-Host: overcat
  9. Organization: /home/users/rouquett/.organization
  10. References: <Bx8H74.Dpz@news.cso.uiuc.edu>
  11. Date: Thu, 5 Nov 1992 18:39:08 GMT
  12. Lines: 17
  13.  
  14.  
  15. Here is a script that I use as a filemgr comman in openwindows.
  16.  
  17. #!/bin/csh
  18. foreach v ($argv[1-])
  19. echo "Removing the ^M characters from the file $v..."
  20. if (-e /tmp/pu$$) /bin/rm /tmp/pu$$
  21. sed -e 's/^M//' $v > /tmp/pu$$
  22. cp /tmp/pu$$ $v
  23. /bin/rm /tmp/pu$$
  24. end
  25. echo "Done."
  26.  
  27. --
  28. ----------Nicolas Rouquette----------rouquett@aig.jpl.nasa.gov
  29.     Artificial Intelligence Group
  30.       Jet Propulsion Laboratory
  31.