The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 12-11-2007
gus2000 gus2000 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 157
There are a variety of ways to do what you suggest. The simplest is to create variables that the shell will convert to all uppercase or lowercase:


Code:
typeset -u COMP_UPPER PT_UPPER
typeset -l COMP_LOWER PT_LOWER

The variables above will always convert their values to uppercase or lowercase, respectively. Of course, you can also convert via other programs:


Code:
echo "$COMP" | tr '[a-z]' '[A-Z]'
echo "$COMP" | awk '{print toupper($0)}'

You get the idea.