Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use a function defined in a bash profile in a bash script?

I have a Projection function in my bash_profile. Now I am trying to call this function from a bash script however I get a not found error. How do I make the projection function visible to the bash script?

like image 294
sL' Avatar asked Nov 04 '22 00:11

sL'


1 Answers

You must export the function

export -f foo

ref

like image 70
Zombo Avatar answered Nov 09 '22 12:11

Zombo