I want to redirect my output twice from a commandline
For example:
comp.reg $T_GDS_MASTER/bin.new $T_GDS_MASTER/bin.old > $T_GDS/log/comp.reg.out 2>&1
I want that command to also print to the screen. How can I do this?
bashlinuxshell
I want to redirect my output twice from a commandline
For example:
comp.reg $T_GDS_MASTER/bin.new $T_GDS_MASTER/bin.old > $T_GDS/log/comp.reg.out 2>&1
I want that command to also print to the screen. How can I do this?
Best Answer
The command that you are looking for is
tee
. The full syntax is here.