dos2unix shell script
Terry Lincoln
lincoln2@rochester.rr.com
Sun Jun 11 19:41:00 GMT 2000
----- Original Message -----
From: "John Paulson" <munch@powertv.com>
To: <cygwin@sourceware.cygnus.com>
Sent: Friday, June 09, 2000 8:21 PM
Subject: dos2unix shell script
> Appended is a script I use to convert CRLF to CR on
Unless your translating source to be read on a Mac, i'd change the above
line to read: "... CRLF to LF on"
> selected files. To use it, the files to be converted
> must be on a
>> <<< _binary_ mount point >>>
>> _not_ a text mount point.
>> I use it this way:
>> bash$ find . -type f -name '[Mm]akefile*' | xargs dos2unix
>> which will convert makefiles residing on a binary mount
> point, a common source of complaint on this list.
>> Cheers!
>>> --- cut here ---
> #! /bin/sh
> if [ ! "1ドル" ] ; then
> echo `basename 0ドル` file ...
> echo ' convert' filenames from dos to unix
> exit 1
> fi
>> while [ "1ドル" ] ; do
> TMP=1ドル.$$
> if tr -d '\r' <"1ドル" >"$TMP" ; then
> cp -a -f "$TMP" "1ドル"
> fi
> rm -f "$TMP"
> shift
> done
>> ----------------------------
> John Paulson
> PowerTV, Inc.
> Tel: 408/777-4769
> Fax: 408/777-0176
> mailto:paulson@powertv.com
> http://www.powertv.com/
>>regards,
W. Terry Lincoln (please to CC replies to me)
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list