The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 10-23-2006
vgersh99's Avatar
vgersh99 vgersh99 is offline
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,002
Code:
nawk -F, -v OFS=',' -v asd='33,44' -v mnmn='55,66' '$1 == "asd" || $1 == "mnmn" '$1 == "asd" || $1 == "mnmn" {$1= $1 OFS (($1==asd) ? asd : mnmn)}1' myFile.txt

Last edited by vgersh99; 10-23-2006 at 04:45 AM.
Reply With Quote