Use and capture of the "time" command

Tyler Aviss tjaviss-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Mon Nov 15 22:26:55 UTC 2010


Wow... actually that option doesn't even work. Seems like the
debian/ubuntu version of time is perhaps a bit messed up.

root at linux: ~# time -o /tmp/foo.txt dd if=/dev/zero bs=1k count=5000
-o: command not found

real	0m0.178s
user	0m0.150s
sys	0m0.010s

root at linux:~# time --output=/tmp/foo.txt dd if=/dev/zero bs=1k count=5000
bash: --output=/tmp/foo.txt: No such file or directory

real	0m0.002s
user	0m0.000s
sys	0m0.000s


On Mon, Nov 15, 2010 at 2:22 PM, Ian Petersen <ispeters-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> On Mon, Nov 15, 2010 at 2:20 PM, Tyler Aviss <tjaviss-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
>> Responding to myself, but FYI I am aware that time has arguments to
>> write/append a file, it's just annoying if I want to do something like
>> assign the result to a variable or existing open FH, etc...
>
> What happens if you use that option to write to /dev/stdout?
>
> Ian
> --
> 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
>



-- 
Tyler Aviss
Systems Support
LPIC/LPIC-2/DCTS/CLA

“It can takes months to gain a customer, but only seconds to lose one"
--
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