[mrtg] Re: cfgmaker
Alex van den Bogaerdt
alex at slot.hollandcasino.nl
Wed Aug 29 00:28:19 MEST 2001
Slightly off topic but hey, not 100% :)
Perry, Duane wrote:
> Shell script example:
>
> /usr/bin/cfgmaker --show-op-down $1@$2 > $3.cfg
> grep -v ^# $3.cfg > $3x.cfg
> mv $3x.cfg $3.cfg -f
May I suggest the following:
/usr/bin/cfgmaker --show-op-down $1@$2 | grep -v ^# > $3.cfg
For some shells it may prove necessary to use quoting characters
to remove any special meaning from, for instance, the # character.
/usr/bin/cfgmaker --show-op-down $1@$2 | grep -v '^#' > $3.cfg
This will work for most shells. No need to use a temporary file.
However, it removes all kind of possibly useful information.
I think the hack I posted earlier is more appropriate.
cheers,
--
__________________________________________________________________
/ alex at slot.hollandcasino.nl alex at ergens.op.het.net \
| work private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. |
+----------------------------------------------------------------------+
| http://faq.mrtg.org/ |
| http://rrdtool.eu.org --> tutorial |
+----------------------------------------------------------------------+
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list