1 ?RCS: $Id: Tr.U,v 3.0.1.2 1994/10/29 18:00:54 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
12 ?RCS: Revision 3.0.1.2 1994/10/29 18:00:54 ram
13 ?RCS: patch43: forgot to quote $@ to protect against "evil" characters
15 ?RCS: Revision 3.0.1.1 1994/10/29 15:58:35 ram
16 ?RCS: patch36: created
19 ?X: This unit produces a bit of shell code that must be dotted in in order
20 ?X: to do a character translation. It catches translations to uppercase or
21 ?X: to lowercase, and then invokes the real tr to perform the job.
23 ?X: This unit is necessary on HP machines (HP strikes again!) with non-ascii
24 ?X: ROMAN8-charset, where normal letters are not arranged in a row, so a-z
25 ?X: covers not the whole alphabet but lots of special chars. This was reported
26 ?X: by Andreas Sahlbach <a.sahlbach@tu-bs.de>.
28 ?X: Units performing a tr '[A-Z]' '[a-z]' or the other way round should include
29 ?X: us in their dependency and use ./tr instead.
31 ?MAKE:Tr: startsh tr eunicefix
32 ?MAKE: -pick add $@ %<
35 : see whether [:lower:] and [:upper:] are supported character classes
39 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
41 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
46 echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4
49 : set up the translation script tr, must be called with ./tr of course
53 '[A-Z][a-z]') exec $tr '$up' '$low';;
54 '[a-z][A-Z]') exec $tr '$low' '$up';;