December 28th, 2011, 02:43 PM
How to execute shell script without doing /bin/sh ?
Hi. I created a simple script to ssh to a server so I don't need to remember the ip.
Please ignore the ip, it's just an example.
If I just run it "ssh-server" it will returns command not found. I even rename the file to ssh-server.sh but still the same.
Is there a way I can run the script without putting /bin/sh at the beginning? I just want to type less that's all and see if it's possible?
December 28th, 2011, 02:48 PM
Make the file executable.
If it already is, then give the full path to the file, or add the directory containing the file to your PATH.
If you're in the directory where the file is located, and it's executable, use ./ssh-server.
I ♥ ManiacDan & requinix
This is a sig, and not necessarily
a comment on the OP:
don't be a help vampire
December 31st, 2011, 02:22 PM
Originally Posted by ptr2void