[DCPM] windows newlines in #! line
Simon Waters
simon at technocool.net
Thu Jul 20 12:07:42 PDT 2006
Steve Marvell wrote:
> This started as a CGI problem. Apparently, some of the Perl scripts a
> particular company provide are littered with Windows newlines. This
> casuse a bad interpretor error.
>
> This is also the case if the script is run by hand.
>
> I understand that the present version of a Apache the clinet is using
> handles this.
>
> I take this is a shell problem, but I think it could be solved if
> Apache prestripped them
>
> Anyone got any ideas?
The usual cause is incorrectly transferring the files to the server. ftp
will correctly translate text files, but if they are shipped up as a zip
file then the transfer is skipped.
Just;
find . -name "*.pl" -print0 | xargs -0 dos2unix
Or whatever appropriate pattern is required for the find.
More information about the Devoncornwall-pm
mailing list