Bash Scripting - Functions
Which is the correct way to define a function named
greet in bash?greet in bash?function name() { } or name() { } syntax.def greet() { echo "Hello"; } is Python syntax, greet() => { echo "Hello"; } is JavaScript arrow function syntax, func greet() { echo "Hello"; } uses invalid keyword. Only function greet() { echo "Hello"; } is valid bash syntax.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions