Quote:
Originally Posted by gus2000
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.
|
I guess the OP wanted the variable values to be
capitalized - not the
whole string to be
UPPER-cased.
The OP will have to clarify!