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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
returning multiple values from a function in C Andrewkl High Level Programming 8 01-20-2009 06:03 PM
how to assign multiple values in a pl/sql script vivek_damodaran Shell Programming and Scripting 2 05-29-2008 11:09 AM
get lines with multiple values at a position deepakgang Shell Programming and Scripting 9 03-27-2008 04:23 AM
find -regex: matching multiple extensions r0sc0 Shell Programming and Scripting 2 12-08-2005 02:32 PM
matching multiple times in same line oldtrash Shell Programming and Scripting 2 04-28-2004 06:57 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-12-2009
VGR VGR is offline
Registered User
  
 

Join Date: Mar 2008
Location: kolkata
Posts: 34
matching multiple values in awk

How will you change the 5th column in the data file with the value in the second column in the error_correction.txt file.
You have to match an extra variable, column 3 of the error_correction file with column 6 of the data.txt file.


data.txt:

vgr,bugatti veron,,3.5,Maybe,6,.......,ax2,....
vgr,lamborgini,,3.5,nos,6,.......,gd2....
abc,bugatti veron,,3.5,nos,,6,.......,as3.......
.
.
.
.


error_correction.txt:
VenoM,Venom,am1
Venom,VENOM,ax2
nos,NOS,ba1
nos,N2O,gd2
nos,n2o,as3
..
.
.
.


How would you do this using awk?
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:02 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0