moving upper case names to lower case

Root Boy Jim rbj at dsys.ncsl.nist.gov
Tue Aug 29 04:20:33 AEST 1989


? From: Guy Harris <guy at auspex.auspex.com>

? >It's easier to write and compile this than to get tr to massage
? >the string for you.  

? Well, maybe, but I really tend to doubt it.  The algorithm for finding
? the right "tr" command is:

[algorithm deleted -- it should be correct given Guy's knowledge]

? And there's even an optimization; given the way the V7/2.xBSD/4.xBSD
? "tr" parses its arguments, the command

? 	tr '[A-Z]' '[a-z]'

? will do the right thing (it will translate '[' to '[' and ']' to ']', as
? well as translating upper-case letters to lower-case letters; this trick
? does *not* work in general, though, since '[' and ']' don't have special
? meaning to the V7/2.xBSD/4.xBSD "tr").

Interesting point.

Yeah, but what about that stupid null-eating property of tr?
Any plans to fix it? Maybe with an option? TR needs more feechurs :-)

	Root Boy Jim
	Have GNU, Will Travel.



More information about the Comp.unix.questions mailing list