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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-03-2009
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Wink An example to get you started...


Code:
> echo "867 5309 VerNOM 1234 Abcd"
867 5309 VerNOM 1234 Abcd

> echo "867 5309 VerNOM 1234 Abcd" | awk -v v1="VerNOM" -v v2="Vernom" '{gsub(v1,v2,$3);print}'
867 5309 Vernom 1234 Abcd