The UNIX and Linux Forums  

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
Mac OS X 10.5.8 Combo Update 10.5.8 iBot UNIX and Linux RSS News 0 09-25-2009 02:00 AM
Mac OS X 10.5.7 Combo Update iBot UNIX and Linux RSS News 0 07-11-2009 08:30 AM
Mac OS X Server Combo 10.5.7 iBot UNIX and Linux RSS News 0 05-12-2009 11:00 PM
what is the similar command for "grep -v" in nawk? prsam UNIX for Dummies Questions & Answers 7 12-08-2008 08:19 AM
how to access values of awk/nawk variables outside the awk/nawk block? saniya Shell Programming and Scripting 5 05-13-2008 08:37 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-28-2009
scriptr2be scriptr2be is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 10
Question grep, awk, nawk combo

I have 2 files:

File1
"aa","server","001-9031234-001",

File2
001-9031234-001|12345

Both files have many lines of text. Each line needs to be evaluated. I need to look at the value of the third field in File 1. Then look for that same value in File 2 and assign the value of Field 2 in that file to num.

so num for this example would equal 12345. The value of num would then be input back into File1 so File1 would then look like
"aa","server","001-9031234-001","12345",


Thanks,
 

Bookmarks

Tags
awk, grep, nawk

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 06:01 AM.


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