Just at a guess, your script has a CR at the end of the shebang line? | [reply] |
And with regard to ysth's reply, I once noted that if my shebang line was #!/usr/bin/perl followed by a carriage return (due to editing the script on a Windows machine and then transferring to Linux), the script exited with an error that the command was not found. (Putting -w at the end of the line fixed the problem, because then the carriage return was ignored as an unknown option, I think.) You can check if the return is there by editing the script in binary mode with vi(m) or emacs, etc.
chas | [reply] |
| [reply] |
Some people take the approach of creating a "/usr/bin/perl\r" link to /usr/bin/perl :)
| [reply] |
And Unix commands in general, too! Because of shell design and such, typing rm * in a directory which contains a file named -rf could delete everything (except the file -rf)! You should do rm -- * instead. I have actually been bitten by this once or twice, but luckily not by -rf but something more mundane.
| [reply] [d/l] [select] |
Looks like it worked.
thanks so much
| [reply] |
Check you shebang(#!) line. You probably have ^M or some other unprintable character there. | [reply] |
Yep, that was the problem.
Thanks
| [reply] |