Previously, Paul Jarc wrote:
> Corrin Lakeland <lakeland@cs.otago.ac.nz> wrote:
> > I have been given a script in DOS format (\n\r)
>
> DOS format is \r\n, not \n\r.
>
> > and running bash with it caused errors
>
> Right. What made you expect differently?
I'd expect that the CR would be treated as an extra white-space
character at the end of each line. And indeed, this seems to work for
me on all but the initial #! line. This fails (at least on Linux)
because the exec() call can't find an interpreter named "/bin/bash\r".
I'd be interested in what OS you're using and what error message you
get.
-- John Kodis.