5

this command is to redirect output of time to with multiple args:

$ time wc test >wc.out 2>time.out

unix programming environment book shows that the error output of time redirects to time.out, but it seems that it's treating the 2>time.out portion as part of the wc command and not redirecting the error output to time.out as I expected, so what is the problem?

1 Answer 1

5

The usual solution to this problem is to put your time command in a group:

$ { time wc test >wc.out; } 2>time.out

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .