Helpful Information
 
 
Category: CGI Scripts / Perl
Error running shell scripts - bad interpreter

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!

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

You were correct. I was using notepad and then transfering the script. I recreated them using vi and all is well. Thanks!!










privacy (GDPR)