Contents
How do I run a script from another directory in Linux?
This is how it’s usually done:
- Make a bin directory under your home directory and mv your scripts into it.
- Change all the scripts to executable ( chmod +x ).
- Ensure that your PATH environment variable contains your $HOME/bin directory. On some systems, the default ~/.
31 окт. 2015 г.
How do I run a bash script from a folder?
- Make a bin directory under your home directory and mv your executable scripts into it. …
- Move your executable scripts in bin direcoty. …
- Now add it to your path variable. …
- Check if that path is added in path variable. …
- Verify if script is running from any random directory.
1 февр. 2013 г.