Shell redirection

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


On Wed, Dec 21, 2011 at 03:06:59PM -0500, Jason Shaw wrote:
> time CMD > /some/file 2>&1  works for me using
> 
> jshaw at jshaw:~$ bash --version
> GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
> 
> jshaw at jshaw:~$ time ls -alh >  /tmp/huh 2>&1
> 
> real    0m0.045s
> user    0m0.000s
> sys     0m0.000s
> 
> All of my output is in /tmp/huh and the time output is on the console.

That is a feature of bash using the builtin time.

If you used /usr/bin/time instead that wouldn't be true.

-- 
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