Article View: alt.lang.awk
Article #23using tr's [::] notation [Was: Re: tolower() function?
From: Jim Meyering
Date: Thu, 28 Jan 1993 04:04
Date: Thu, 28 Jan 1993 04:04
20 lines
1485 bytes
1485 bytes
| > >>I often use tr for this very reason. For example: | > >> | > >> echo "HeLlO, wOrLd!" | tr [:upper:] [:lower] | > try | tr [A-Z] [a-z] | | The advantage to using [:upper:] and [:lower:] instead of [A-Z] and [a-z] is | locale support. Not everyone uses ASCII and US English. | | here's a shocker: not all tr's have that notation. must be an IBMism :-) If your version of tr doesn't support it, get GNU tr -- it does. Maybe you should get it anyway; it's significantly faster in many cases than the few vendor-supplied versions I've compared it to. You can find a version in the GNU textutils-1.4 release. Jim Meyering | Member of the League for Programming Freedom meyering@cs.utexas.edu | Contact me or lpf@uunet.uu.net for more info. -- Jim Meyering | Member of the League for Programming Freedom meyering@cs.utexas.edu | Contact me or lpf@uunet.uu.net for more info.
Technical Details
Message-ID:
<lmemqmINNj11@ai.cs.utexas.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!hela.iti.org!usc!cs.utexas.edu!newsReferences:
<1993Jan24.093340.17437@psg.com> <C1EzDw.FtF@austin.ibm.com> <EMCOOP.93Jan25124421@bcars148.bnr.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!hela.iti.org!usc!cs.utexas.edu!news From: meyering@cs.utexas.edu (Jim Meyering) Newsgroups: alt.lang.awk Subject: using tr's [::] notation [Was: Re: tolower() function? Date: 27 Jan 1993 22:04:38 -0600 Organization: U of TX at Austin CS Dept Lines: 20 Message-ID: <lmemqmINNj11@ai.cs.utexas.edu> References: <1993Jan24.093340.17437@psg.com> <C1EzDw.FtF@austin.ibm.com> <EMCOOP.93Jan25124421@bcars148.bnr.ca> NNTP-Posting-Host: ai.cs.utexas.edu Summary: GNU tr supports [:class:] notation