Please reread Section 2.1 Starting the BASH debugger of the bashdb
manual http://bashdb.sourceforge.net/bashdb.html#SEC7, especially the
paragraph that begins:
There are two or three disadvantages ...
The basic problem is that bash and other POSIX shells don't allow $0
to get set. The next release of bashdb will include a built-in
function to get around this, however in order to use this, bashdb has
to be built for this which requires having the bash source around. And
building against a specific release of bash ties bashdb to it. Many
distributions that package bash don't do this (e.g. Debian) although
some do (e.g. cygwin).
On Mon, Jul 21, 2008 at 10:48 PM, Peng Yu <pen...@gm...> wrote:
> Hi,
>
> Without using bashdb, I could use "$0" to get the bash script name.
> With bashdb I don't see a way to get the script name. Can I somebody
> let me know how to do it?
>
> Thanks,
> Peng
>
>
> $ cat echo.sh
> #!/bin/bash
>
> echo $0 $1
>
>
> $ bashdb echo.sh
> Bourne-Again Shell Debugger, release bash-3.1-0.06
> Copyright 2002, 2003, 2004, 2006 Rocky Bernstein
> This is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
>
> (/tmp/echo.sh:3):
> 3: echo $0 $1
> bashdb<0> n
> /usr/bin/bashdb
> (/usr/bin/bashdb:285):
> 285:
> bashdb<1> n
> Debugged program terminated normally. Use q to quit or R to restart.
> bashdb<2> q
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bashdb-help mailing list
> Bas...@li...
> https://lists.sourceforge.net/lists/listinfo/bashdb-help
>
|