Alright, so let's say I have a .bash file with this inside of it
lib.bash
#!/bin/bash
function hello_world {
echo "Hello World!"
}
That file won't be called on it's own, instead it'll be called via another bash file, i.e
Startup.bash
#!/bin/bash
bash lib.bash
hello_world
But, if I run Startup.bash I get the error: hello_world: command not found
What am I doing wrong, or is it not possible to do what I'm trying to do on bash.
source lib.bash