The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 07-04-2009
panyam panyam is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2008
Posts: 474
Code:
 
I want to replace KG with K in field 11th in all the rows.
None of the solutions from jayan_jay or lathavim are checking for the 11th filed.

Bit change to lathamvim's solution :

Code:
awk 'BEGIN {FS=OFS=","} $11 ~/KG/ { $11 = "K" ; print }'  File_name.txt

Last edited by panyam; 07-04-2009 at 09:13 AM..