7.12 Including Other Files in Scripts


7.12 Including Other Files in Scripts

If you need to include another file in your shell script, use the . operator. For example, this runs the commands in the file config.sh :

 . config.sh 

This "include" file syntax does not start a subshell, and it can be useful for a group of scripts that need to use a single configuration file.




How Linux Works
How Linux Works: What Every Superuser Should Know
ISBN: 1593270356
EAN: 2147483647
Year: 2004
Pages: 189
Authors: Brian Ward

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net