Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function definitions: Add syntax that works for POSIX compliant shells #72

Open
palash25 opened this issue Jan 26, 2019 · 0 comments
Open

Comments

@palash25
Copy link

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 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant