I'm trying to learn shell scripting and have runned into problems with functions.
Since you have to read all functions into memory before they are used it would be nice to be able to place all your functions in an functions.sh file and start the main script by running the function.sh script i.e. read all functions into memory.
Is this possible?
I have tried to place the functions in a script:
And then read it and tried to run the s_echo_hej in another script:
Here are the result:
./testi.sh: s_echo_hej: not found
Is this possible? And in that case, what am I doing wrong?