running a bash file from different directory
by hnasr2001 from LinuxQuestions.org on (#521P2)
I have a bash script called bash.sh in the
/home/operator/Desktop/Python/backup/ directory.
I have added the path to the $PATH
[operator@localhost backup]$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/operator/.local/bin:/home/operator/bin:/home/operator/Desktop/Python/backup/
From the same directory, I can run the file without adding "./"
How can I run the script from different directory just by typing its name
Thanks


/home/operator/Desktop/Python/backup/ directory.
I have added the path to the $PATH
[operator@localhost backup]$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/operator/.local/bin:/home/operator/bin:/home/operator/Desktop/Python/backup/
From the same directory, I can run the file without adding "./"
How can I run the script from different directory just by typing its name
Thanks