help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Pipes in ExecResult()


From: Cole, Tim
Subject: RE: Pipes in ExecResult()
Date: Mon, 30 Aug 2004 17:53:33 -0400

Nelson,

See below!

> Hi All,
>
> I'm trying the following to determine the default gateway for Solaris
and
> Linux
> boxes:
>
> control:
>
> DefaultGateway = ExecResult(/bin/netstat -rn | grep UG | awk '{ print
$2
> }')

Every command in your pipe chain must have the full path!!!

DefaultGateway = ExecResult(/bin/netstat -rn | /bin/grep UG | /bin/awk
'{ print $2}')


>
> and I'm getting syntax errors. If I use quotes, I get an error msg
stating
> that
> the path must be absolute. Do I need to write a module to do this?
>
> Thanks,
>        /\/elson

Cheers,



-------------------------------------------------------------------------------------
This e-mail is the exclusive, private and confidential property of the sender. 
The
information contained in it is intended solely for the use of the sender and the
intended recipient. If you are not the intended recipient you are hereby 
advised that
any unauthorized disclosure, copying, distribution or the taking of any action 
in
reliance on the contents of this message is strictly prohibited. If you have 
received
this e-mail in error, please notify us immediately by telephone (call the USF
Corporation Technical Support Center at 1-800-753-4563) and then destroy this
document and any copies in any form immediately.  Finally, the recipient should
check this email and any attachments for the presence of viruses. USF 
Corporation
accepts no liability for any damage caused by any virus transmitted by this 
email.
-------------------------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]