Re: strange tr behaviour

From: Michael Reifenberger <mike_at_Reifenberger.com>
Date: Fri, 26 Mar 2004 11:09:12 +0100 (CET)
On Fri, 26 Mar 2004, Jon Noack wrote:

> Date: Fri, 26 Mar 2004 02:48:14 -0600
> From: Jon Noack <noackjr_at_alumni.rice.edu>
> To: Michael Reifenberger <mike_at_Reifenberger.com>
> Cc: freebsd-current_at_freebsd.org
> Subject: Re: strange tr behaviour
>
...
> Short version:
> tr(1) was modified to be POSIX compliant for 5.x.  You are seeing
> correct behavior.  See the solution below.
>

Thanks all for the hints.

Only that tr(1) states:
...
COMPATIBILITY
     System V has historically implemented character ranges using the syntax
     ``[c-c]'' instead of the ``c-c'' used by historic BSD implementations and
     standardized by POSIX.  System V shell scripts should work under this
     implementation as long as the range is intended to map in another range,
     i.e. the command ``tr [a-z] [A-Z]'' will work as it will map the ``[''
     character in string1 to the ``['' character in string2.  However, if the
...

So I just expected the historic behaviour so that [a-z] map to [A-Z]
as before :-(

Bye/2
---
Michael Reifenberger, Business Development Manager SAP-Basis, Plaut Consulting
Comp: Michael.Reifenberger_at_plaut.de | Priv: Michael_at_Reifenberger.com
      http://www.plaut.de           |       http://www.Reifenberger.com
Received on Fri Mar 26 2004 - 01:09:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:49 UTC