NetBSD-Bugs archive

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

bin/41761: sh(1) doesn't provide the $LINENO builtin variable



>Number:         41761
>Category:       bin
>Synopsis:       sh(1) doesn't provide the $LINENO builtin variable
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 21 19:05:00 +0000 2009
>Originator:     Stathis Kamperis
>Release:        NetBSD 5.0_STABLE
>Organization:
Aristotle University of Thessaloniki
>Environment:
NetBSD voyager 5.0_STABLE NetBSD 5.0_STABLE (MYGENERIC) #8: Mon Jul  6 19:55:40 
EEST 2009  root@voyager:/usr/obj/sys/arch/i386/compile/MYGENERIC i386

>Description:
Quoting from Issue 6:

LINENO
    Set by the shell to a decimal number representing the current sequential 
line number (numbered starting with 1) within a script or function before it 
executes each command. If the user unsets or resets LINENO , the variable may 
lose its special meaning for the life of the shell. If the shell is not 
currently executing a script or function, the value of LINENO is unspecified.

http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
>How-To-Repeat:
[stathis@voyager ~] cat lineno.sh 
#!/bin/sh
echo $LINENO
[stathis@voyager ~] ./lineno.sh 

[stathis@voyager ~] 
>Fix:



Home | Main Index | Thread Index | Old Index