[m-rev.] diff: fix tr portability bug
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue May 7 18:59:49 AEST 2002
On 07-May-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 07-May-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > Estimated hours taken: 0.75
> > Branches: main
> >
> > configure.in:
> > Change "tr a-z A-Z" to "tr '[a-z]' '[A-Z]'". The former is
> > Posix-conforming, but doesn't work on some non-Posix-conforming
> > systems, in particular Solaris. The latter works on both Solaris
> > and on Posix-conforming systems.
>
> It might be better to spell it out:
> `tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
Well, that would work, but I had hoped that it wouldn't be necessary.
> For example /usr/xpg4/bin/tr on taifun doesn't support
> character ranges properly.
Are you sure? It seemed to work OK for me:
$ echo FooBar | /usr/xpg4/bin/tr '[a-z]' '[A-Z]'
FOOBAR
$ echo Foo/Bar.c | /usr/xpg4/bin/tr '[a-z]./' '[A-Z]__'
FOO_BAR_C
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list