Re: tracing inside functions

2007-05-31 Thread Andreas Schwab
Chet Ramey <[EMAIL PROTECTED]> writes: > Nic James Ferrier wrote: >> Using bash 2.05, does anyone know of a way to get a trace of what's >> happening inside a function? > > Only by adding `set -x' inside the function body. Or by upgrading to a shell that is not 6 years old. :-) Andreas. -- And

Re: tracing inside functions

2007-05-31 Thread Chet Ramey
Nic James Ferrier wrote: > Using bash 2.05, does anyone know of a way to get a trace of what's > happening inside a function? Only by adding `set -x' inside the function body. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but to

Re: tracing inside functions

2007-05-31 Thread Paul Jarc
Nic James Ferrier <[EMAIL PROTECTED]> wrote: > Using bash 2.05, does anyone know of a way to get a trace of what's > happening inside a function? You can add "set -x" at the top of the function body. I don't know of any way to get a similar effect without editing the script. paul

tracing inside functions

2007-05-31 Thread Nic James Ferrier
Using bash 2.05, does anyone know of a way to get a trace of what's happening inside a function? eg file /root/myscript: #!/bin/bash function x { LIST=`ls /someplace` [ "$LIST" == "" ] && exit 0 mv $LIST /tmp } x and then: bash -x /root/myscript will only