|
Well, if you've been told not to change your PATH, then you perhaps should not do that. If I have a script in my home directory, I use ./script too. But I do it for security. And I have to say that typing ./ does not bother me. But you can avoid that without changing your PATH.
If you use the command:
alias script=/full/path/to/script
then from now on, you can just use "script" to run the command.
alias commands can be put in your .bash_profile file. I wasn't clear if you are allowed to edit that file at all. You could just put your alias commands in a file called "setup" or something. And then use this command:
. ./setup
to cause your shell to process that file. Note that leading dot. This is a little different than running a script. A dot command causes the current shell to read commands from the named file.
So give aliases a try. You get the result you wanted: no leading ./ required. And the sysadmins are happy since you are using the prescribed PATH.
|