use of 'testing' function from testsuite/testing.sh

Paul Smith paul at mad-scientist.us
Fri May 2 16:29:27 PDT 2008


On Fri, 2008-05-02 at 19:27 -0400, Paul Smith wrote:
> Plus, if the thing DID eat FOO, then the read will never return and
> your test will hang.

Oops, that was stupid.  Of course that's not right.  The first point
stands though.


You can rewrite it like this and I think it will work:

        echo FOO | { some command; read foo; echo $foo; }

If that prints FOO you're OK; otherwise "some command" used it up.


More information about the busybox mailing list