04-04-2003
1,071,
7
Join Date: Aug 2001
Last Activity: 24 February 2017, 5:03 PM EST
Location: San Antonio, TX,
Posts: 1,071
Thanks Given: 0
Thanked 7 Times in 6 Posts
Yls177,
The reason that the "sh filename.sh " works is because you are invoking the bourne shell. Remember "sh" is actually a command. Read the man on sh.
When you use ./filename.sh, You are trying to execute the file in the current directory using its internal scripting. You must have the shell you are invoking inside the script, in the /etc/shells file. If not your script will fail.