Re: wrong lineno inside trap?

2009-01-14 Thread peter360
case.edu > http://cnswww.cns.cwru.edu/~chet/ > > Thanks for the explanation. -- View this message in context: http://www.nabble.com/wrong-lineno-inside-trap--tp21383479p21472277.html Sent from the Gnu - Bash mailing list archive at Nabble.com.

Re: wrong lineno inside trap?

2009-01-12 Thread Chet Ramey
peter360 wrote: > I wrote a test program test.sh: > > trap ' > > echo this is line 3, but LINENO=$LINENO > > ' 0 > > echo this is line 7, and LINENO=$LINENO > --- > when I ran it I got > $ sh /tmp/test.sh > this is line

Re: wrong lineno inside trap?

2009-01-09 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to peter360 on 1/9/2009 6:07 PM: > trap ' > > echo this is line 3, but LINENO=$LINENO > > ' 0 > > echo this is line 7, and LINENO=$LINENO > Is this a known problem? Thanks. In general, LINENO handling is inconsistent among shells. The

wrong lineno inside trap?

2009-01-09 Thread peter360
ine 3, but LINENO=11 My bash version is $ sh --version GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. Is this a known problem? Thanks. -- View this message in context: http://www.nabble.com/wrong-lineno-inside-trap--tp21383479p213