PDA

View Full Version : Error running shell scripts - bad interpreter



theaudioforum
04-27-2004, 10:33 PM
If I try to run simple shell scripts, it always results in the error:

: bad interpreter: No such file or directory


The script is very simple; such as:

#!/bin/sh
mysqldump -u root -ppassword test > /backups/test.sql

Any ideas? The script has chmod 777.

Thanks!

jalal
04-28-2004, 01:54 AM
Are you writing the script on a Windows machine and then uploading it? It may have Windows line endings if so.

Otherwise the above script works for me (just using 'mysqldump', no params).

HTH

theaudioforum
04-28-2004, 08:52 AM
You were correct. I was using notepad and then transfering the script. I recreated them using vi and all is well. Thanks!!