Source: util-linux
Version: 2.17.2-9
Severity: wishlist
Tags: patch

>From the man page of script:
  -c  This makes it easy for a script to capture the output of a program
      that behaves differently when its stdout is not a tty.
I think it should be possible to furthermore capture the exit status of
the program.

For example:
  $ script -c "e2fsck -v /dev/foo" e2fsck.log
used in a script does not allow one to know if the check failed or not
(without analyzing the log), and piping the output of fsck instead of
wrapping it with script makes fsck refuse to do an interactive repair.

That's why I wrote a patch, attached to this mail, that adds a command
line option -e that makes script exit with the same exit status as the
monitored program.

Attachment: util-linux_script-e.20120201.patch
Description: Attachment: util-linux_script-e.20120201.patch

Reply via email to