You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
300 B
19 lines
300 B
#!/usr/bin/env miaou-bash
|
|
|
|
function f1 {
|
|
if [[ -v nested_count ]]; then
|
|
>/dev/tty echo already defined $nested_count
|
|
((nested_count++))
|
|
else
|
|
>/dev/tty echo brand new
|
|
nested_count=1
|
|
fi
|
|
echo $nested_count
|
|
}
|
|
|
|
echo "v=$(f1)"
|
|
echo "v=$(f1)"
|
|
echo "v=$(f1)"
|
|
f1
|
|
f1
|
|
echo $nested_count
|