Re: $bash - how to import functions in a file
you can create a file of frequently used variable, functions, etc in a ".cfg" file and then at the top of your script include one of these lines... they all do the same thing!
I found this solution in the "Bash Cookbook" (Albing, Vossen, & Newham)...every bash scripter should have a copy of this book within each reach!
Code:
. $HOME/prefs.cfg
Code:
$include $HOME/prefs.cfg
Code:
source $HOME/prefs.cfg
No comments:
Post a Comment