I have seen function defined two ways in bashrc:
dosomething() { ... }
and
function dosomething() { ... }
What difference does it make to use the function declaration?
http://www.gnu.org/s/bash/manual/bash.html#Shell-Functions
Functions are declared using this syntax:
[ function ] name () compound-command [ redirections ]This defines a shell function named name. The reserved word function is optional. If the function reserved word is supplied, the parentheses are optional.
function and omitting parentheses is bash-specific. So to be more portable, don't use it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With