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