Bash Scripting - Variables
What will be the output of this script?
VAR=hello
function test_func() {
local VAR=world
echo $VAR
}
test_func
echo $VARVAR=hello
function test_func() {
local VAR=world
echo $VAR
}
test_func
echo $VARecho $VAR inside prints 'world'.echo $VAR after function call prints 'hello'.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions