The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: cut in line
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 03-18-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361
Quote:
Originally Posted by Trump View Post
thnx for script ,
can you tell me how to set first four characters to upper case?

Code:
a=$( printf "%s\n" "$a" | tr [:lower:] [:upper:] )
In ksh:

Code:
typeset -u a
In bash4.0:

Code:
a=${a^^}