bug-bash
[Top][All Lists]
Advanced

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

Re: EOF does not work in echo


From: Paul Jarc
Subject: Re: EOF does not work in echo
Date: Thu, 25 May 2006 21:46:47 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

"Cai Qian" <loricai@gmail.com> wrote:
> It suggests that "cat" has not seen EOF (004) generated by echo.

The character 004 is not EOF.

When typing at a terminal which is set to "cooked" mode, you use the
keystroke control-D to tell the terminal driver that it should send
EOF to the program reading from the terminal.  Control-D is also used
in other contexts (such as typing at a terminal in "raw" mode) to
produce the character 004.

In the case of a pipe, a reader will not see EOF until all writers
have closed the pipe (typically when they exit).


paul




reply via email to

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