On 2/2/22 9:00 AM, L A Walsh wrote:
> I was trying to find parameters to a function that gave an error, so
> I 'turned on' (included my backtracing routine), which showed:
>
> ./24bc: line 46: printf: `txt=\nRed,': not a valid identifier
> STOPPING execution @ "printf ${_:+-v $_} '\x1b[48;2;%s;%s;%sm' $1 $2 $3" in
> "setBgColor()" at ./24bc #46
> called in setBackBlack() at ./24bc #56
> called in title() at ./24bc #74
> called in main() at ./24bc #81
>
> ----
> I was all, 'rats, its not showing the params', I wondered why and looked at
> the code,
> and realized that while I can backtrace function, source line+file, I didn't
> know how to display the params that were used when the function was called.
Look at BASH_ARGC and BASH_ARGV and how the debugger uses them.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/