[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] nested local function
From: |
Peng Yu |
Subject: |
[Help-bash] nested local function |
Date: |
Mon, 4 Jun 2012 12:10:03 -0500 |
Hi,
I think that there is no way to define a local function in function.
For example, g is available outside f. And if I add "local" before
"function g", I will get syntax error.
#!/usr/bin/env bash
function f {
echo "$0"
function g {
echo in g
}
g
}
f
g
Could anybody confirm with me that there is no local function support in bash?
--
Regards,
Peng
P.S., if you want to suggest some walkaround other than addressing my
question directly, please refrain from doing so, as I'm not interested
these irrelevant answers.
- [Help-bash] nested local function,
Peng Yu <=