On 10/18/14 11:25 AM, Alan Wild wrote:
> I'll agree it's non-obvious, but this works for me on a BASH 2.x I have
> handy.
>
> arwild01@BRONX:~$ echo $BASH_VERSION
> 2.05b.0(1)-release
> arwild01@BRONX:~$ function myfunc() { :; }
> arwild01@BRONX:~$ declare -f myfunc
> myfunc ()
> {
> :
> }
Th
On 10/18/14 10:35 AM, Tim Friske wrote:
> Hi,
>
> when I define the following function:
>
> $ function foo {
> > echo bar
> > }
>
> and try to run it, I get:
>
> $ foo
> bar
>
> but try to print its definition with "declare", I get:
>
> $ declare -p foo
> bash: declare: foo: no
I'll agree it's non-obvious, but this works for me on a BASH 2.x I have
handy.
arwild01@BRONX:~$ echo $BASH_VERSION
2.05b.0(1)-release
arwild01@BRONX:~$ function myfunc() { :; }
arwild01@BRONX:~$ declare -f myfunc
myfunc ()
{
:
}
-Alan
On Sat, Oct 18, 2014 at 9:35 AM, Tim Friske wrote:
>
Hi,
when I define the following function:
$ function foo {
> echo bar
> }
and try to run it, I get:
$ foo
bar
but try to print its definition with "declare", I get:
$ declare -p foo
bash: declare: foo: not found
$ declare -pf foo
bash: declare: foo: not found
$declare -pF