The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 08-23-2007
summer_cherry summer_cherry is offline
Registered User
 

Join Date: Jun 2007
Location: Beijing China
Posts: 557
use awk

hi
see follow example

input(a.txt):

Code:
a b c
d e f
code:

Code:
cat a.txt | awk '{
printf("$s,$s,$s",$1,upper($2),$3)
}' a.txt
output:

Code:
a B c
d E f
Reply With Quote