Google search page (WAS Re:Use and capture of the "time" command)

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


Just a quick question.

I don't do much on the computer at home these days (too many chores),
but it seems that google has been unusually slow. The previous project
was actually a script that runs "curl" and times how long a page takes
to load. Anyone else seeing a bunch of random slowdown in google
during the daylight hours?

--- Site "http://www.google.ca" ---
Attempt #1: 0.16 secs

Attempt #2: 7.98 secs

Attempt #3: 5.35 secs

Attempt #4: 2.66 secs

Attempt #5: 0.26 secs

On Mon, Nov 15, 2010 at 2:33 PM, Chris F.A. Johnson
<chris-E7bvbYbpR6jSUeElwK9/Pw at public.gmane.org> wrote:
> On Mon, 15 Nov 2010, Tyler Aviss wrote:
>
>> I'm  trying to time some commands and dump the output to a running
>> log. For some reason unknown to me, the time command always seems to
>> spit directly to my terminal, even when I'm redirecting stdout and
>> stderr.
>>
>> Anyone know what's going on. For example, this should be dumping to a
>> file, not my screen like...
>>
>>
>> root at linux: ~# time dd if=/dev/zero bs=1k count=5000 > /tmp/foo.txt 2>&1
>>
>> real    0m0.037s
>> user    0m0.000s
>> sys     0m0.040s
>>
>> Perhaps I'm just short of caffeine and doing something incredibly
>> dumb, but it doesn't seem right
>>
>> I checked the man-page and it says any arguments after the command
>> following "time" are considered arguments of said command, so I
>> thought perhaps it was interpreting it like
>>
>> time $( dd if=/dev/zero bs=1k count=5000 > /tmp/foo.txt 2>&1 )
>>
>> In that case, I should have be able to override using...
>>
>> echo $( time dd if=/dev/zero bs=1k count=5000 > /tmp/foo.txt 2>&1 )
>>
>>
>> But I get the same thing. output to the screen and nada in /tmp/foo.txt
>> Anyone know what's up with this?
>
> x=$( (( time cd ../../../cfajohnson.com/amorasutol/image ) 2>&1) )
>
> --
>   Chris F.A. Johnson, <http://cfajohnson.com>
>   Author:
>   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
>   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
> --
> 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