Quote:
Originally Posted by
enoch99
What I wanted is to run the shell script program like any command just typing the omly the name not with an extension like .sh and preceeding the name of the shell i.e
Not- sh filename.sh
But- filename
Thanks.
I think you are mixing concepts.
File extensions have no meaning to the OS in UNIX, as they have in Windows. You could name your script whatever you want. But, in order to run it, as cfajohnson has told you, you have to set exec perms.
On the other hand, what you want is to avoid the use of either "sh" before the name of the script, and the use o "./" after it. To do so, you have at least two possibilities:
- Add the directory which contains the binary to your PATH variable.
- Copy or link it in one directory that's already in your PATH.
Regards.