Peter Peltonen wrote:
> 
> mick wrote:
> 
> > When I opened the scripts they had the windows ^m character
> > at the end of each line. I was getting the same error until I
> > removed them.
> 
> With what program do I find and remove the characters?

dedos.pl and endos.pl; usage '*dos file[s]'
---8<---snip
#!/bin/perl -pi
#
# Remove trailing CRs to make DOS-format Unix-friendly
#
s:\015$::;
---8<---snip
#!/bin/perl -pi
#
# Add CRs to the ends of all lines (that do not already have them)
# in order to make a Unix file DOS-friendly (e.g., openable and
# readable in Notepad).
#
if ($_ !~ m:\015$:) {
    chomp($_);
    $_ .= "\015\n";
}
--->8---snap
-- 
#ken    P-)}

Ken Coar                    <http://Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed"   <http://ApacheUnleashed.Com/>

ApacheCon 2001!
Four tracks with over 70+ sessions. Free admission to exhibits
and special events - keynote presentations by John 'maddog' Hall
and David Brin. Special thanks to our Platinum Sponsors IBM and
Covalent, Gold Sponsor Thawte, and Silver Sponsor Compaq.  Attend
the only Apache event designed and fully supported by the members of
the ASF. See more information and register at <http://ApacheCon.Com/>!

Reply via email to