autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 02-lineno.patch


From: Alexandre Duret-Lutz
Subject: Re: 02-lineno.patch
Date: 23 Sep 2001 16:01:48 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>> "Akim" == Akim Demaille <address@hidden> writes:

[...]
 Akim> Most modern shells provide the current line number in @code{LINENO}.
 Akim> Its value is the line number of the beginning of the current command
 Akim> (see below the output of the here document).  The behavior wrt
 Akim> @command{eval} differs according to the shell, but, amusingly, not in
 Akim> the case of sub shells:
[...]
 Akim> $ cat lineno
 Akim> echo 1. $LINENO
 Akim> cat <<EOF
 Akim> 3. $LINENO
 Akim> 4. $LINENO
 Akim> EOF
 Akim> ( echo 6. $LINENO )
 Akim> eval 'echo 7. $LINENO'
[...]  
 Akim> $ bash-2.03 lineno
 Akim> 1. 1
 Akim> 3. 2
 Akim> 4. 2
 Akim> 6. 6
 Akim> 7. 1
[...]
 Akim> $ zsh-3.1.9 lineno
 Akim> 1. 1
 Akim> 3. 2
 Akim> 4. 2
 Akim> 6. 6
 Akim> 7. 7

I don't know how important this is:

$ ksh lineno       # (@(#)PD KSH v5.2.14 99/07/13.2)
1. 1
3. 2
4. 2
6. 6
7. 0

[...]
-- 
Alexandre Duret-Lutz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]