On Thu, 6 Sep 2007 11:51:14 +0200
Martin Buck <[EMAIL PROTECTED]> wrote:

> In your first test case, calc's stdin is connected to your terminal.
> Since you provided command line arguments, it doesn't become
> interactive after performing the calculation on the command line and
> exits.

Ah, that explains it!  I hadn't suspected 'calc' read from stdin; the man
page alludes to stdin, but doesn't explain what's done with it, or 
how it works. 

> I could imagine that this behaviour might be a useful feature instead
> of a bug, but then I agree that it should be documented in the man
> page.

Definitely should be documented.
 
> BTW, as a workaround, you can append a "< /dev/null" to the calc
> invocation in the second case. This should make it behave as you
> expected.

Thanks very much for that tip, (it works), now I can use 'while read'
loops.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to