If using tee (one of the different versions of Windows) is not an option, and the command does not work for a long time or you do not need to perform further processing of the output in real time, then
command > file && type file
will do it for you. But only under the indicated circumstances. You should probably use tee .
source share