suppress known warning message

When snmpd is started on FC6, a warning will appear.
How to suppress only this known warning message? i.e. other warning
message will still appear.
# /sbin/service snmpd start > /dev/null
WARNING: initlog is deprecated and will be removed in a future release

If I do this, I am afraid all other warning messages (if any in the
future) will be suppressed:
#/sbin/service snmpd start >& /dev/null
wong_powah [ Fr, 16 November 2007 05:31 ] [ ID #1872090 ]

Re: suppress known warning message

In article <fe5bd444-6762-4313-9874-74095a32e809 [at] a39g2000pre.googlegroups.com>,
<wong_powah [at] yahoo.ca> wrote:
>When snmpd is started on FC6, a warning will appear.
>How to suppress only this known warning message? i.e. other warning
>message will still appear.
># /sbin/service snmpd start > /dev/null
>WARNING: initlog is deprecated and will be removed in a future release
>
>If I do this, I am afraid all other warning messages (if any in the
>future) will be suppressed:
>#/sbin/service snmpd start >& /dev/null

/sbin/service snmpd start 2>&1 >/dev/null |
grep -v "WARNING: initlog is deprecated and will be removed in a future release" >&2

John
--
John DuBois spcecdt [at] armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/
spcecdt [ Fr, 16 November 2007 07:50 ] [ ID #1872091 ]

Re: suppress known warning message

On 2007-11-16, wong_powah [at] yahoo.ca <wong_powah [at] yahoo.ca> wrote:
> When snmpd is started on FC6, a warning will appear.
> How to suppress only this known warning message? i.e. other warning
> message will still appear.
> # /sbin/service snmpd start > /dev/null
> WARNING: initlog is deprecated and will be removed in a future release
>
> If I do this, I am afraid all other warning messages (if any in the
> future) will be suppressed:
> #/sbin/service snmpd start >& /dev/null

/sbin/service snmpd start 2>&1 | grep -v 'initlog is deprecated'
Bill Marcum [ Fr, 16 November 2007 06:15 ] [ ID #1872107 ]
Linux » comp.unix.shell » suppress known warning message

Vorheriges Thema: Passing password to the program(application) through shell scripting
Nächstes Thema: Re: Bash 1-liner needs refining.