Mail Archives: cygwin/1999/01/13/19:46:55
Doug Carter wrote:
>
> Thanks for the tip, but you are going in the wrong direction. I
> want to go from unix to dos, which means I need to *add* a "\r"
> not delete one. How would tr work in that way?
>
> Thanks,
>
> Doug
>
> Heinz-Juergen Oertel wrote:
> >
> > 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?
> > >
> > No, but it is simpler to use
> >
> > tr -d "\r" < infile > outfile
> >
> > but what is with umlauts ??
> > Oh i see, it's not your problem.
> >
> > Anyhow, does anybody ported recode ?
> >
> > > TIA,
> > >
> > > Doug Carter
> >
ok, it's not a job for tr.
sed 's/$/^M/' in > out
does it with
bash 2.02.1(2)
sed 3.02
and a binary mounted file system w98
you need no g flag, it can be only one newline in a line
I'am not a sed guru,
always looking at the examples in 'UNIX Power Tools'
--
with best regards / mit freundlichen Grüßen
Heinz-Jürgen Oertel
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -