May 20, 2002 #1 hronek MIS Joined Nov 1, 2001 Messages 14 Location US I am trying to capitilize a string in a ksh script and can not figure out how to do so. Can anyone help me? Thank you, Steven Hronek
I am trying to capitilize a string in a ksh script and can not figure out how to do so. Can anyone help me? Thank you, Steven Hronek
May 20, 2002 Thread starter #2 hronek MIS Joined Nov 1, 2001 Messages 14 Location US A friend just figured it out This is an example. > LSTR=abc;CSTR=`echo $LSTR | tr '[:lower:]' '[:upper:]' `;echo $CSTR >ABC Upvote 0 Downvote
A friend just figured it out This is an example. > LSTR=abc;CSTR=`echo $LSTR | tr '[:lower:]' '[:upper:]' `;echo $CSTR >ABC
May 22, 2002 #3 dobbyn Programmer Joined Jan 23, 2002 Messages 120 Location US An easier way is to typeset your variable. In ksh: typeset -u VAR VAR=test echo $VAR produces the output "TEST" Upvote 0 Downvote
An easier way is to typeset your variable. In ksh: typeset -u VAR VAR=test echo $VAR produces the output "TEST"