From: kevin lyda (kevin at domain suberic.net)
Date: Fri 17 Sep 1999 - 12:27:25 IST
"John P . Looney" spoke thusly:
>On Fri, Sep 17, 1999 at 12:07:35PM +0100, Sean McGrath mentioned:
>> > And, later, call it with:
>> > assert "$#" == "5"
>> > Is there any way I can print out the name of the shell function that
>> > assert() was called from ?
>> $LINENO ? In bash anyways.
> Good call. Means I've to look up the function that went bad, but it's a
>start. C'mon gurus. This has to be possible.
you realise that positional parameters ($1, $2, $3, etc) and $# change
inside a function? as far as i can see it isn't possible to get the name
of the function you're in without explicitly stating it.
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:04:34 GMT