bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invoking as 'ed - filename' broken in ed-0.3-pre[12]


From: Eric Blake
Subject: Re: Invoking as 'ed - filename' broken in ed-0.3-pre[12]
Date: Sat, 21 Oct 2006 10:21:11 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Antonio Diaz Diaz on 10/21/2006 10:08 AM:
> John Cowan wrote:
>> Antonio Diaz Diaz scripsit:
>>> For example, I expected "cal -m | ed -" to edit the output of the
>>> "cal" command.
>>
>> Using commands read from where?
> 
> From the keyboard, of course.

The point of the question was that your example means that the keyboard is
no longer tied to ed's stdin.  Do you really expect ed to open "/dev/tty",
even though that is not necessarily portable?

> 
>> And where would the output of the "w" command go?
> 
> I expected ed to ask for a filename, as other editors do.

Again, how does ed read the answer for the filename that it asked for,
seeing that stdin is the pipe?

> 
> Certainly ed is a strange editor for today's computer users. :)

Strange or not, ed is specified by POSIX, and changing 30-year-old
behavior, even though that particular behavior is not part of the POSIX
specification, is asking for problems.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFOkj384KuGfSFAYARAqt+AJwKz5fyimS6Nm8j3um4xDXAyyayYgCgjWaM
tmhHhPuk6nDe+E6rhUI/nwg=
=S87/
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]