[XML-SIG] XML Parsing problem

Matt Gushee Matt Gushee <mgushee@havenrock.com>
Thu, 26 Sep 2002 03:51:07 -0600


On Thu, Sep 26, 2002 at 10:16:48AM +0100, Bill de hÓra wrote:
> 
> > However when I try to execute my shell script I get
> > the following error:
> > 
> > $ ./format.sh
> > : bad interpreter: Permission deniedn/python2.1
> > : bad interpreter: Permission deniedn/python2.1
> 
> Kumar,
> 
> Check your script for weird eol characters like ^M. That's usually the
> reason I get a "bad interpreter" message. There's a switch in vi that
> can highlight ^M (which I don't remember, perhaps someone here knows
> it).

Oh, that's right. I knew I had seen this problem before, but didn't
remember why. I'm not sure how to highlight the ^Ms in vi, but I know
how to globally search-and-replace them (in Vim, that is):

  :%s/^M/^M/g

(in case you're not very familiar with vim '^M' is the single character
produced by typing Ctrl-v Enter)

That's a little counterintuitive, but you can think of it as 'find the
character ^M and replace it with the character produced by the Enter
key'.
-- 
Matt Gushee
Englewood, Colorado, USA
mgushee@havenrock.com
http://www.havenrock.com/