running a perl script.

Brian E. Seppanen seppy at chartermi.net
Wed Mar 14 16:04:03 CET 2007


On Wed, 14 Mar 2007, Mark Thompson wrote:

> The file was never on a win machine here. I opened the file with kwrite and vi and don't see the ^M in the text.
>
>>>> "Marc Powell" <marc at ena.com> 03/14/07 8:04 AM >>>
>

The ^M is a non-printable character that the editor is hiding from you. 
It is a windows carriage return.

Open up a shell and try to see if you can find
dos2unix

which dos2unix

If it finds dos2unix then run it as follows to convert the ^M to the unix 
equivalent
dos2unix filename

After you've rid the file of the ^M you should be ok to run it.  Now you 
should open your kwrite preferences and find out why it's using ^M for 
Carriage Returns.  From the sounds of it, if you are going to use kwrite 
for writing unix scripts you will always encounter this problem unless you 
either correct kwrite preferences (assuming it's configurable), or start 
using a different editor.

HTH.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list