Quick snippet, as I was searching for this one today.
You can output both standard and error output to both screen and log file with the below command:
my_command.sh 2>&1 | tee my_command.log
- replace with your command (possibly including arguments)
- redirects standard error to standard output, otherwise only standard output is written to file
- my_command.log pipes the output to tee, which writes both to screen and file