Complete the code to define a function named greet.
function [1]() { echo "Hello!" }
The function name should be greet to match the task.
Complete the code to call the function greet.
[1]In bash, to call a function, just write its name.
Fix the error in the function definition to make it valid bash syntax.
function greet [1] echo "Hello!" }
The function body must start with a curly brace { in bash.
Fill both blanks to create a function that prints a passed name.
function [1]() { [2]="$1" echo "Hello, $[2]!" }
The function name is say_hello and the variable holding the name is name.
Complete the code to call the function say_hello with the argument 'Alice'.
say_hello "[1]"
To call a function in bash script, just write its name followed by arguments separated by spaces. No extra keywords needed.
