bash-guide
bash-guide copied to clipboard
Function definitions: Add syntax that works for POSIX compliant shells
Ref: https://stackoverflow.com/questions/12468889/bash-script-error-function-not-found-why-would-this-appear
The syntax described in the guide should also be accompanied by this alternative so that beginners in bash don't face the error function not found
like I did
#!/bin/bash
hello() {
echo world!
}
hello
say() {
echo $1
}
say "hello world!"
Let me know if you need a PR for this I would be happy to do it :smile: