dash: built-in variable LINENO mandated by POSIX not there

Rocky Bernstein rocky.bernstein at gmail.com
Mon Jul 14 16:06:23 UTC 2008


On Mon, Jul 14, 2008 at 10:31 AM, Marius Gedminas <marius at pov.lt> wrote:
> On Sun, Jul 13, 2008 at 09:02:49AM -0400, Rocky Bernstein wrote:
>> Package: dash
>> Version: 0.5.4-8ubuntu1
>> Severity: normal
>
> Unfortunately, reportbug in Ubuntu still sends emails to the mailing
> list instead of filing a bug report in https://bugs.launchpad.net/ubuntu/
>
>> In Section 2.5.3, Shell Variables [XCU 2303] LINENO seems to be mandated:
>>
>> [...] This  volume of POSIX.1-200x
>> specifies the effects of the variable only for systems supporting the
>> User Portability Utilities option.
>
> This language seems to say LINENO is optional.

The language used in the POSIX guide here is little ambiguous, but
what I think what is meant is that on systems supporting the "User
Portability Utilities option", LINENO is supposed to be there. And
"systems" here would refer to I think Ubuntu or Debian which are
supposed to have portability commands (which POSIX calls "utilities")
such as awk, vi and so on. I don't think "system" in what you cited
above is referring to the shell.

Let's take a look at what other "User Portabilties option" things are
mentioned in chapter 2. In section 2.3.1 there is alias substitution
and then in section 2.5.3 there is the ENV, LINENO and PPID, PS1, PS2,
and PS4 variables. Of these, LINENO is the only one that dash doesn't
have.

So in again in sum I think what is meant that if you are running on
some sort of system, e.g., an embedded controller which may not
implement processes and does not have any sort of interactive
capability, then a shell like dash doesn't have to support aliases,
ENV, LINENO, PPID, PS1, PS2 or PS4. But I don't think that the case
here.

>
> Marius Gedminas
> --
> Always proofread carefully to see if you any words out.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFIe2NUkVdEXeem148RAifKAKCIw97NjHbCJXW1U7rpHR928TGgCwCfU4sL
> aOUUp7EtGpUzo5ak4fCGyqE=
> =a57E
> -----END PGP SIGNATURE-----
>
>




More information about the ubuntu-users mailing list