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
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
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
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