redirect errors to multiple locations
Hi,
I'm wondering if there's a way to run a command and get:
- stderr and stdout goes on screen.
- make a copy of everything on screen, incl stderr,stdout to history.log
- BUT also make seperate logfile containing only errors, errorlog.log.
Something like this:
ls asdf 2>errorlog.log | tee history.log
But the problem here is that the errors does not appear on screen nor in the history.log
|