On Tue, Sep 16, 2008 at 8:52 AM, Jim Cheetham <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 15, 2008 at 9:29 PM, Chris Hellyar <[EMAIL PROTECTED]> wrote:
>> #!/bin/bash
>>   echo -n "  OK        "
>>   date
>>   echo -n "  "
>>   cat /tmp/pingouttxt | grep time= | cut -d "=" -f 4
>
> printf is nice, but over the top.
I'm curious. What makes you suggest that?
I am aware that in this particular and simplistic case it's nebulous,
but wouldn't the use of the printf bash builtin is to be preferred
over spawning two child processes?

> You just need to get all the data
> into a single invocation of echo ...
>
> echo "OK  $(date) $(cat /tmp/pingouttxt|grep time=|cut -d "=" -f 4)"

-- 
Sincerely etc.
Christopher Sawtell

Reply via email to