-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2112
Joachim Ansorg edited this page Nov 12, 2021
·
3 revisions
#!/bin/sh
function hello() {
echo "Hello World"
}
#!/bin/sh
hello() {
echo "Hello World"
}
function
is a non-standard keyword that can be used to declare functions in Bash and Ksh.
In POSIX sh
and dash
, a function is instead declared without the function
keyword as in the correct example.
None.
- Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!