I've known you could use source to hide your variables in a second file
But I did not know until today you could also park functions there.
How I make a living in IT I sometimes do not know.
% foo.conf
BASE=/opt/app/
% foo.sh
#!/bin/sh
source foo.conf
cat "$BASE"/file.txt
But I did not know until today you could also park functions there.
% foo.conf
BASE=/opt/app/
function type_file (){
cat "$BASE"/file.txt
}
% foo.sh
#!/bin/sh
source foo.conf
type_file
How I make a living in IT I sometimes do not know.