I forget the semicolon:
{ time sudo echo 'hi mon' ; } 2> file.log
On Sat, Sep 27, 2008 at 12:17 AM, Javier Barroso <[EMAIL PROTECTED]> wrote:
> On Wed, Sep 24, 2008 at 4:19 PM, Eugene V. Lyubimkin
> <[EMAIL PROTECTED]> wrote:
>> Brian McKee wrote:
>> ...
>>> Can someone explain the redirection goi
On Wed, Sep 24, 2008 at 4:19 PM, Eugene V. Lyubimkin
<[EMAIL PROTECTED]> wrote:
> Brian McKee wrote:
> ...
>> Can someone explain the redirection going on here in a way I can grok?
> 'time' writes output to stderr, use "time sudo echo 'hi mom' 2>&1"
I would use:
{ time sudo echo 'hi mon' } 2> fil
On Thu, Sep 25, 2008 at 2:17 PM, Michelle Konzack
<[EMAIL PROTECTED]> wrote:
>time sudo (echo 'hi mom' | tee | logger -f /var/log/hiMom)
==> time sudo (echo 'hi mom' | tee | logger -f /var/log/hiMom)
-bash: syntax error near unexpected token `echo'
--
To UNSUBSCRIBE, email to [EMAIL PROTECT
Am 2008-09-24 09:59:26, schrieb Brian McKee:
> Hi All
>
> I regularly run a script with time and sudo. e.g.
> > time sudo echo 'hi mom'
>
> I've set up the sudoers file so that one script (represented in my
> example as `echo`) can be run as sudo by my user account without a
> password prompt.
>
On Wed, Sep 24, 2008 at 10:19 AM, Eugene V. Lyubimkin
<[EMAIL PROTECTED]> wrote:
> Brian McKee wrote:
>> I regularly run a script with time and sudo. e.g.
>>> time sudo echo 'hi mom'
> [snip]
>> Now I want to log the entire output to a log file as well as display
>> it on the screen.
>>> time sudo
Brian McKee wrote:
> Hi All
>
> I regularly run a script with time and sudo. e.g.
>> time sudo echo 'hi mom'
[snip]
> Now I want to log the entire output to a log file as well as display
> it on the screen.
>> time sudo echo 'hi mom' | tee | logger -f /var/log/hiMom
>
> Only that doesn't work :-
Hi All
I regularly run a script with time and sudo. e.g.
> time sudo echo 'hi mom'
I've set up the sudoers file so that one script (represented in my
example as `echo`) can be run as sudo by my user account without a
password prompt.
Now I want to log the entire output to a log file as well as
7 matches
Mail list logo