Tag » Posts Tagged ‘Bash’

Shell script – how to find out the directory in which it resides?

Shell Script

My shell script samplescript.sh resided in the directory /home/projects/sampleproject/scripts and in the shell script I included a configuration file relatively as below:



Continue reading »

How to include a file in a bash shell script


I had written few shell scripts for a project. All these scripts were using some common configuration parameters so I decided to put them in a common file and include it in the scripts file so that when I move the script files from the development to the production environment, I have to change the values in only one file.

My configuration file “config.conf” contained variables like:


Continue reading »

Back to top