Shell script is not executing

Hi,

I am trying to execute the below shell script: script name(ss1).

ss1 was given permission - 744 before executing.

name: ss1
#ss1
#usage:ss1
ls
who
pwd
:wq
I tried to execute $ss1 (Enter)
Its not executing.... It says that ss1 is not found:

echo $SHELL. The o/put i got is /sbin/sh.
What should i have to do inorder the shell script to be executing.

Thanks

$ ./ss1

ss1 is in the / root directory. Even though i tried with ./ss1 it is not working it still says ss1: is not found

First of all, please do not crosspost your question like that. Crossposting is against the rules.

The root directory is not a great location for your script. But to run it, use the full path:
/ss1

The first line of a shell script should be something like:
#! /usr/bin/sh
or whatever shell you are using. Do you really have a line with ":wq" in your script? Or a line "name: ss1"? That would not make sense. I can't tell what lines you are claiming to have in your script.

Also, it looks as if you're doing this whilst being logged in as root as your shell is /sbin/sh

I would strongly discourage you being logged in as root uneccessarily, especially if you are new to UNIX, as a wayward moment on the command line can lead to a completely useless system.

Cheers
ZB

Have you done a "chmod +x <filename>" ?

I'm not sure that the file would be executable with chmod 744... (I'm sure someone will tell me if I'm wrong :slight_smile: )

(edit)
Actually on second thoughts, the error message would be along the lines of "file not executable" if that was the case...