Re: ed scripts in Windows command shell

[email protected]
Newsgroups gmane.comp.gnu.utils
Organization http://groups.google.com
Message-ID <6301e782-fcf2-4ac6-97da-27b0aabaeb63@d19g2000prm.googlegroups.com>
On May 14, 4:24 pm, [email protected] wrote:
> Although I have experience with diff and ed on *nix, I just can't seem
> to get ed to work in the Win32 environment (cmd.exe).
>
> diff -e oldfile newfile > script.ed
>
> gives the proper ed commands, but any variation of
>
> type script.ed | ed oldfile > result
>
> just won't work: I get either an empty result, or the last line of the
> original file repeated a few times in the result. I've tried 'for'
> loops with 'echo' and 'type', appending 'w' and 'q' commands to
> script.ed, and all sorts of variations. Still no luck.
>
> Has anyone had success using 'ed' commands with Win32?
>
> P.S. I want to use the 'ed' output from diff, since several 'ed'
> commands can be concatenated together to apply several changes -
> unlike 'context' and 'unified' diffs that have to be appiled
> individually against each intermediate result.

P.P.S.

I'm trying to use the GnuWin32 ed utility.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.