Call 'script' command and exit it from within a bash script

Posted by William Jamieson on Server Fault See other posts from Server Fault or by William Jamieson
Published on 2012-11-13T04:18:59Z Indexed on 2012/11/13 5:02 UTC
Read the original article Hit count: 561

Filed under:
|
|

I'm using the linux 'script' command http://www.linuxcommand.org/man_pages/script1.html to log all input and output in an interactive bash script.

At the moment I have to call the script command, then run my bash script, then exit.

I want to run the script and exit commands from within the actual bash script itself. How can I do this?

I've tried script -a but that doesn't work for interactive scripts.

Any assistance would be greatly appreciated.

© Server Fault or respective owner

Related posts about bash

Related posts about scripting