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
using sed to conditionally extract stanzas of a file based on a search string aitayemi Shell Programming and Scripting 0 11-25-2008 06:16 PM
update a file with values from other file in shell bash teodora Shell Programming and Scripting 1 07-03-2008 11:39 AM
Extract values from log file wdympcf Shell Programming and Scripting 5 08-10-2007 03:52 AM
Extracting data from text file based on configuration set in config file suparnbector Shell Programming and Scripting 3 08-10-2007 02:25 AM
I need to extract last column of a file and compare the values vukkusila Shell Programming and Scripting 4 08-04-2007 11:21 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 Rating: Thread Rating: 1 votes, 4.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-11-2009
Gussifinknottle Gussifinknottle is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 20
Question extract from a file based on values in another file

Hello,

I have two files that have delimited entries as shown below. I would like to use either Perl or Shell script to extract all the rows in File 1 corresponding to values in File 2 and output it to another File.

File 1
-------
1 36 24 Object1
2 45 36 Object2
3 96 21 Object3
4 89 32 Object4
5 98 23 Object5
6 99 21 Object6
7 56 21 Object7

File 2
-------
2 45 36
5 98 23
6 99 21


Thanks,
Gussi
 

Bookmarks

Tags
extract data from textfile, perl

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 02:49 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