Shell redirection

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Dec 21 20:08:42 UTC 2011


On Wed, Dec 21, 2011 at 02:57:58PM -0500, Neil Watson wrote:
> Suppose I have a command:
> 
> "time <other_cmd>"
> 
> How can I redirect the other command's stdout and stderr but not the
> output of time?

Well you can send the output of time to a file with 'time -o filename
command'.

I don't think you can do what you wanted though otherwise.

You could maybe do something like:

time sh -c 'myactualcommand > blah 2> errorblah'

Seems to work as far as I can tell.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list