Re: How to get the script line number on demand

2003-02-16 Thread Harry Putnam
"John W. Krahn" <[EMAIL PROTECTED]> writes: > print 'Program name: ', __FILE__, "\n"; > print 'Current script line: ', __LINE__, "\n"; > print 'Current package: ', __PACKAGE__, "\n"; Thanks.. I'd seen those first too in a few places but blithely zipped over them not realizing what they were. Th

Re: How to get the script line number on demand

2003-02-15 Thread John W. Krahn
Harry Putnam wrote: > > How does one print the line number of the script as it executes. > > Something like what the PS4 shell var does if you set it to: > > PS4='$LINENO' > Then when running a shell script with -x flag you see script line > numbers as it runs. > > I'd like to stick these into

How to get the script line number on demand

2003-02-15 Thread Harry Putnam
How does one print the line number of the script as it executes. Something like what the PS4 shell var does if you set it to: PS4='$LINENO' Then when running a shell script with -x flag you see script line numbers as it runs. I'd like to stick these into code at times to help debug print "mydb