Bash Scripting - Functions
What is the output of this script?
greet() {
echo "Hi, $1!"
}
greet Bobgreet() {
echo "Hi, $1!"
}
greet Bobgreet prints "Hi, $1!", where $1 is the first argument passed.greet Bob replaces $1 with "Bob", so output is "Hi, Bob!".15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions