I\'m trying to run a bash script on my Ubuntu machine and it is giving me an error:
bash script
function not found
To test, I
I faced the same problem, I then modified the syntax and it worked for me. Try to remove the keyword function and add brackets () after the function name.
#!/bin/bash sayIt() { echo "hello world" } sayIt