severity 199464 thanks To be more precise about what this issue is about...
It looks like when "script" finds out that its stdin is not a tty, it launches the commands in the background and immediately returns. Although the "script < file" example from OP can be quite easily worked around using the "script -c '...'" syntax, there is another problem when one runs script from cron/at. When "script" is called from another program, this behaviour just changes the whole program flow. Eg: rm -f log && script -c 'dotomething > log.tmp && mv log.tmp log' && test -f log A script containing such a command will always return false when run from cron, whereas it works as expected when run from the shell. Since this behaviour is not documented in the manpage, this should be considered a bug. If it is not easy to implement a more correct behaviour, at least the caller should have some means to specify that it relies on synchronous command execution, and script should probably abort at once. -- Yann Dirson - Bertin Technologies -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

