views:

234

answers:

2

In the beginning of a file on my server (linux), which is located in the /etc/init.d/ folder I have this line:

 !/bin/sh -e

What does it mean, because every time I execute the rest of the script it works fine except for an error which shows:

 !/bin/sh not found

Any ideas?

+4  A: 
 #!/bin/bash   

this is the first line in the script to tell the system to use bash shell to execute the script.

daedlus
+7  A: 

Looks to me like a messed up shebang line. You need to put a '#' in front of the '!'.

tster
Yeah, definitely a messed up shebang line. Look for an `$Author: William Hung$` somewhere in the file.
Mark Peters