Piping an interactive session to a file

后端 未结 4 1838
萌比男神i
萌比男神i 2020-12-05 12:33

I have made a toy interactive console program that is basically an interpreter:

$ myprogram
> this is user input
this is program output

4条回答
  •  无人及你
    2020-12-05 12:52

    An easy way is to use the script command. It just stores your whole terminal session. Run it with:

    script my-interactive-session.log program
    

提交回复
热议问题