we are using some 3rd party interactive command line tool, and we use
tee for logging what a user did - to check later if needed...
The tool works the way it ask which action user want to perform and user selects something and continue with submenu or the action is executed.
Recently (when we needed to check such log) we realized, the user inputs are not there. Is there some alternative - how to achieve that?
When I tried to simulate the tool with:
$ cat r.sh read -p "Enter some text: " text echo $text echo -n "Enter another text: " read text2 echo $text2
I tested and this is the output
$ ./r.sh | tee run.log Enter some text: abc abc Enter another text: def def $ cat run.log abc Enter another text: def
Ideally I'd like to have the same what user saw, which is not the same as you can see.
If someone needs it I tested with
script -c ./r.sh script.log
and it worked as expected + I tested with this 3rd party tool.