On Wed, 27 Mar 2002, Dalton Hunter wrote: > Hi, I am trying to write a file that contains a shell script. The file > writes to the server but when I try to execute it it fails with a > command not found error. But if I copy and paste the files contents into > a new text file using Textpad on my PC and upload it to the same > directory it works?! It is not related to permissions as both files are > 777 and I am root? The only difference I could tell is when I compare > the files in Textpad although the contents are identical, the failed > file is slightly larger and has a file type of "Netscape" in the File > Properties while the other has a file type of "PC"? Any ideas?
Make sure you use unix-style line endings (just \n and no \r). Textpad sort of transparently opens files with different line ending styles, though it does tell you in one of those little status boxes at the bottom - if it's showing DOS or Windows or whatever when you open it, then the shell probably won't execute it. An alternative would be to use text/ASCII (not binary) FTP to transfer it to the server. This will automatically fix the line endings. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php