script(1) --return --quiet --command "bash {0}"
make typescript of terminal session
-e, --return
        Return the exit code of the child process.  Uses the same format as bash termination on signal
        termination exit code is 128+n.
-q, --quiet
        Be quiet.
-c, --command command
        Run the command rather than an interactive shell.  This makes it easy for a script to capture the
        output of a program that behaves differently when its stdout is not a tty.
source manpages: script