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 named greet.
[1]To call a function in bash, write its name followed by parentheses: greet().
Fix the error in the function definition to make it valid bash syntax.
function greet [1] { echo "Hi!" }
In bash, function parameters are declared with parentheses () after the function name.
Fill both blanks to define and call a function named say_hello.
function [1]() { echo "Hello, world!" } [2]()
The function name must be the same in definition and call: say_hello.
Fill all three blanks to define a function greet_user that takes a name and prints a greeting.
function [1]() { echo "Hello, $[2]!" } [3] "Alice"
The function name is greet_user. The first argument is accessed as $1. Call the function with greet_user "Alice".
