I am running commands remotely
stuffing them into
screen commands via SSH. Rather than type directly into the terminal displayed, I use remote SSH commands which are run by clicking a button in a GUI. I use the
screen command because it allows me to see the terminal without having to type directly in it.
For every command executed I want the screen output to be saved to a specified file, in addition to being displayed on the terminal. Not all commands are necessarily executed by
stuffing into the remote screen. The commands can be saved into a script which is uploaded to the remote computer and the
stuff command used to run it.
How do I setup the command to save to a named file in addition to displaying the output as normal. Use of
screen is a convenience but I am looking for a method which can work without
screen/tmux being involved.