Subject: Re: sed question
From: [email-masked] (Charles Wilson)

12 Jan 1999 16:51:21 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Doug Carter <[email-masked]>
Cc: [email-masked]

Doug Carter wrote:

> I'm having some trouble running a sed script with gun-win32.
>
> I have a script that converts text files from unix to dos:
>
> sed 's/$/^M/g' infile > outfile
>
> This command works fine on unix, but it doesn't work in dos.
>
> Can anyone enlighten me?
>
> TIA,
>
> Doug Carter

Well, this script will only work under cygwin if you are using a binary
mount. If you're using a text mount, then cygwin1.dll will remove the ^M's
from infile before sed ever sees it, so the script has no effect. Then, when
sed writes the unchanged file back to outfile, cygwin1.dll will add the ^M's
back to the  file on its way to the disk.

-Chuck

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".