Complete the code to call the function named greet.
greet() {
echo "Hello!"
}
[1]In bash, to call a function, just write its name without parentheses.
Complete the code to call the function say_hello with an argument.
say_hello() {
echo "Hello, $1!"
}
[1]To pass an argument to a bash function, write the function name followed by the argument separated by space.
Fix the error in calling the function print_date correctly.
print_date() {
date
}
[1]Calling a bash function requires only its name without parentheses or extra keywords.
Fill both blanks to call the function greet_user with the argument 'Alice'.
greet_user() {
echo "Welcome, $1!"
}
[1] [2]Call the function by its name followed by the argument without quotes.
Fill all three blanks to call the function calculate_sum with two numbers and store the result.
calculate_sum() {
echo $(($1 + $2))
}
result=$([1] [2] [3])Call the function by its name followed by two arguments separated by spaces inside the command substitution.