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: Cai Qian
Subject: Re: EOF does not work in echo
Date: Fri, 26 May 2006 01:47:20 +0100

The problem is "cat" does not stop reading when see the EOF through the pipe.

echo -e "hello \004world" | cat > log

you cat still see the Control-D in the log.

Qian

On 5/26/06, Mike Frysinger <address@hidden> wrote:
On Thursday 25 May 2006 18:56, Cai Qian wrote:
> echo -e "hello \004world" | cat > /dev/null
>
> will print out nothing
>
> It suggests that "cat" has not seen EOF (004) generated by echo.

you piped the output to /dev/null ... how does that suggest anything ?

looks to me like you're evaluating with the wrong tools ... do something like:
echo -e "hello \004world" > foo
hexedit foo
and you'll see that echo is writing out the 0x04 just fine
-mike







reply via email to

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