[mrtg] cfgmaker script gives ^M

Geba, Scott Scott_Geba at cable.comcast.com
Thu Nov 1 21:18:44 CET 2007


Thank you very much... and yes, I am ashamed. But all of my ip lists are
in excel and I'm pretty bad in vi

 

________________________________

From: derek.winkler at algorithmics.com
[mailto:derek.winkler at algorithmics.com] 
Sent: Thursday, November 01, 2007 4:10 PM
To: Geba, Scott; mrtg at lists.oetiker.ch
Subject: RE: [mrtg] cfgmaker script gives ^M

 

Open your scripts with vi using the -b option for binary.

 

You should then be able to see the ^M characters.

 

Then use the vi command

 

:g/^V^M/s///g

 

to remove the ^M characters.

 

For the ^V ^M press and hold Ctrl then press the character at the same
time.

 

Shame on you for creating unix scripts with notepad.

 

________________________________

From: mrtg-bounces at lists.oetiker.ch
[mailto:mrtg-bounces at lists.oetiker.ch] On Behalf Of Geba, Scott
Sent: Thursday, November 01, 2007 3:45 PM
To: mrtg at lists.oetiker.ch
Subject: [mrtg] cfgmaker script gives ^M

I'm running cfgmaker through a script set in crontab to run once a week
to discover new interfaces, etc. I had this set up for about 5 devices
and it worked great. I recently created a few more scripts with about 30
or so devices each in them, when they are run the last device has a ^M
in it that causes a carriage return and needless to say, messes it up
pretty bad. I created the scripts in notepad in windows and copied them
over the server, figuring this was the issue I opened them up in vi to
try and remove the ^M but there was none. I even overwrote the last few
parts of the line to see if the ^M would get overwritten, no luck. Now
when the scripts run I get a ^M on every script for the last device. It
inserts itself after the ip address so it all looks like this:

 

Target[1.1.1.1^M

_Gi8_24]: #Gi8/24:public at 1.1.1.1^M

:::::2

 

Again, this only happens for the last device in my list of ip's. Any
ideas? 

 

________________________________

This email and any files transmitted with it are confidential and
proprietary to Algorithmics Incorporated and its affiliates
("Algorithmics"). If received in error, use is prohibited. Please
destroy, and notify sender. Sender does not waive confidentiality or
privilege. Internet communications cannot be guaranteed to be timely,
secure, error or virus-free. Algorithmics does not accept liability for
any errors or omissions. Any commitment intended to bind Algorithmics
must be reduced to writing and signed by an authorized signatory. 

________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20071101/7de6444d/attachment.html 


More information about the mrtg mailing list