Reputation: 6835
I have gone through the following steps.
./script1.py
,$PATH
.However, at this point, am I supposed to be able to say script1 arg1
and be able to run it like a built-in bash command or do I still need to set up an alias.
My quick hack is to set up an alias; however, I am not sure if this is redundant.
alias script1 = $HOME/dir/script1.py
Upvotes: 0
Views: 167
Reputation: 21585
mv script1.py script1
should do the trick. I won't recommend it though.
A better way is to add a symblic link:
ln -s script1.py script1
This way, you can add the link directly in some system path - probably /usr/bin
- and won't need to change $PATH
at all:
sudo ln -s script1.py /usr/bin/script1
Make sure it will not override any existing file.
Upvotes: 1