How do I run a shell script without using “sh” or “bash” commands?

I have a shell script which I want to run without using the “sh” or “bash” commands. For example:

Instead of: sh script.sh

I want to use: script.sh

How can I do this?

P.S. (i) I don’t use shell script much and I tried reading about aliases, but I did not understand how to use them.

(ii) I also read about linking the script with another file in the PATH variables. I am using my university server and I don’t have permissions to create a file in those locations.

12 Answers
12

Leave a Comment