On Sun 22 Sep 2019 at 09:10:17 (-0500), Richard Owlett wrote: > I recently downloaded a python script which uses some custom helper > scripts. The scriptS are provided as zip file. The instructions were > ti download to chosen directory and un-zip the file. > > The launching instructions were to do > cd /path/to/script > then > python script.py > > That *WORKS* as advertised. > > I thought I could "simplify" my life by doing > export PATH=$PATH:/path/to/script
It's unwise to modify $PATH (not PATH$) if you're not sure what it does, because you're opening up your system to accidental execution of programs you didn't intend to run. In this instance, there could be executable programs designed for running in the /path/to/script directory, but which might now get run in any context with very different consequences. > and then launch by doing just doing > python script.py The $PATH is searched for the "python" command, not for the "script.py" argument. > That FAILED to find script.py . > May I be pointed to a complete explanation of the use of the PATH$ > environmental variable. > TIA Why not just write a script like: cd /path/to/script python script.py cd "$OLDPWD" Cheers, David.