[Top][All Lists]
[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
- 02-lineno.patch, Akim Demaille, 2001/09/22
- Re: 02-lineno.patch,
Alexandre Duret-Lutz <=
- Re: 02-lineno.patch, Raja R Harinath, 2001/09/25
- Re: 02-lineno.patch, Akim Demaille, 2001/09/27
- Re: 02-lineno.patch, Raja R Harinath, 2001/09/27
- Re: 02-lineno.patch, Akim Demaille, 2001/09/27
- Re: 02-lineno.patch, Raja R Harinath, 2001/09/27
- Re: 02-lineno.patch, Raja R Harinath, 2001/09/27
- Re: 02-lineno.patch, Akim Demaille, 2001/09/29
- Re: 02-lineno.patch, Akim Demaille, 2001/09/27
Re: 02-lineno.patch, Akim Demaille, 2001/09/27