无参数

函数

#the brackets are always empty: a function does not declare
#its parameters, it reads them as $1, $2 and so on
sayGoodbye() {
    echo "Goodbye!"
}

sayGoodbye
#prints "Goodbye!"

#the second form: the word function, the brackets may be left out
function sayHello {
    echo "Hello!"
}

sayHello
#prints "Hello!"