SPUG:DOS textfiles and perl on unix

Jeremy Mates jmates at sial.org
Thu Mar 6 15:16:51 CST 2003


DOS textfiles cause problems for unix, which tries to invoke
/usr/bin/perl^M and subsequently fails with a helpful message.

ln -s /usr/bin/perl `echo -e "/usr/bin/perl\r"`

Actually lets the script run, in my limited testing with perl
5.8 on Mac OS X.  Another option would be to create a perl^M
that issues a warning.

#!/bin/sh
echo "error: $1 uses DOS linebreaks" >&2
exit 1



More information about the spug-list mailing list