I have write a script, and I like to now to make it better readable, by moving parts of my main script in other files, but unfortunately I cannot.
Let's say now I have the following code in file utils.sh
:
#!/bin/bash
sayHello ()
{
echo "Hello World"
}
Them from my main script I try the following, but doesn't work:
#!/bin/bash
./utils.sh
sayHello
So, the question is, how to call the functions from within the utils.sh ?