I’ve written down the requirements for a perfect log command:
- show stdout/stderr of the script in tty while the script is running
- show colors produced by the script in tty while the script is running
- create a log file of all stdout/stderr the script produced
- have the log without colors
- don’t break the ability to read input from stdin
Apparently no such jack of all trades device has been found. The following command fulfills all requirements everything, but stripping colors from the log.
Stripping the color from the log is possible as well.
(source); (There might be other methods or entirely different (better/perfect) approaches to the log issue.
Haven’t tested a full build using the script
approach yet.
Does this suffice?