bug-coreutils
[Top][All Lists]
Advanced

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

Re: "tr -d string1 string2" POSIXLY_CORRECT simplification


From: Paul Eggert
Subject: Re: "tr -d string1 string2" POSIXLY_CORRECT simplification
Date: Sat, 05 Jun 2004 16:31:18 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Jim Meyering <address@hidden> writes:

>     * When the -c option is specified with -d, all values except those
>     specified by string1 shall be deleted. The contents of string2 shall be
>     ignored, unless the -s option is also specified.

Yes, that text is pretty confusing, since it seems to imply that "tr
-cd string1 string2" is allowed (otherwise, why would "string2" be
allowed?).  However (putting my pedantic hat on, which after all is
the point here :-) a conforming application must conform both to this
text and to the SYNOPSIS, and therefore a conforming application
cannot use "tr -cd string1 string2" at all.

OpenBSD and FreeBSD both reject "tr -d string1 string2" (with or
without -c), and they both claim conformance to POSIX, so there is
some precedent for this interpretation.

I think the above wording is a defect in POSIX and I suppose someone
should submit a defect report....

> I don't think anyone will notice the change.

Likewise.




reply via email to

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