Sponsored Content
Top Forums Shell Programming and Scripting Extracting data based on the list file Post 302445784 by shtobias on Tuesday 17th of August 2010 12:58:52 AM
Old 08-17-2010
Extracting data based on the list file

Hi there,

Can you help. I need to extract data based on the list file(list.txt) from item.txt as shown below. Please note the actual files are enormous in size. Thank you.

item.txt
Code:
nokia1100    123,000
nokia2100    66,000
samsung123    11,000
samsung456    23,000
iphone432    234,000
iphone678    123
cherry679    11,000
cherry123    67,456
nokia660    345,222
nokia_series    123,321
nokia4200    23,645
samsung_series    23,978

list.txt
Code:
nokia1100
iphone678
nokia4200
cherry123

output
Code:
nokia1100    123,000
iphone678    123
nokia4200    23,645
cherry123    67,456

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting data from text file based on configuration set in config file

Hi , a:) i have configuration file with pattren <Range start no>,<Range end no>,<type of records to be extracted from the data file>,<name of the file to store output> eg: myfile.confg 9899000000,9899999999,DATA,b.dat 9899000000,9899999999,SMS,a.dat b:) Stucture of my data file is... (3 Replies)
Discussion started by: suparnbector
3 Replies

2. Shell Programming and Scripting

Extracting lines in file based on time

Hi, anyone has any ideas on how do we extract lines from a file with format similiar to this: (based on current time) Jun 18 00:16:50 .......... ............. ............ Jun 18 00:17:59 .......... ............. ............ Jun 18 01:17:20 .......... ............. ............ Jun 18... (5 Replies)
Discussion started by: faelric
5 Replies

3. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

4. Shell Programming and Scripting

Extracting data between tags based on search string from unix file

Input file is on Linux box and the input file has data in just one line with 1699741696 characters. Sample Input: <xxx><document coll="uspatfull" version="0"><CMSdoc>xxxantivirus</CMSdoc><tag1>1</tag1></document><document coll="uspatfull"... (5 Replies)
Discussion started by: gaya
5 Replies

5. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

6. Shell Programming and Scripting

extracting lines based on condition and copy to another file

hi i have an input file that contains some thing like this aaa acc aa abc1 1232 aaa abc2.... poo awq aa abc1 aaa aaa abc2 bbb bcc bb abc1 3214 bbb abc3.... bab bbc bz abc1 3214 bbb abc3.... vvv ssa as abc1 o09 aaa abc4.... azx aaq aa abc1 900 aqq abc19.... aaa aa aaaa abc1 899 aa... (8 Replies)
Discussion started by: anurupa777
8 Replies

7. Shell Programming and Scripting

Generate tabular data based on a column value from an existing data file

Hi, I have a data file with : 01/28/2012,1,1,98995 01/28/2012,1,2,7195 01/29/2012,1,1,98995 01/29/2012,1,2,7195 01/30/2012,1,1,98896 01/30/2012,1,2,7083 01/31/2012,1,1,98896 01/31/2012,1,2,7083 02/01/2012,1,1,98896 02/01/2012,1,2,7083 02/02/2012,1,1,98899 02/02/2012,1,2,7083 I... (1 Reply)
Discussion started by: himanish
1 Replies

8. Shell Programming and Scripting

Script for extracting data from csv file based on column values.

Hi all, I am new to shell script.I need your help to write a shell script. I need to write a shell script to extract data from a .csv file where columns are ',' separated. The file has 5 columns having values say column 1,column 2.....column 5 as below along with their valuesm.... (3 Replies)
Discussion started by: Vivekit82
3 Replies

9. UNIX for Dummies Questions & Answers

Extracting data from one file, based on another file (splitting)

Dear All, I have two files but want to extract data from one based on another... can you please help me file 1 David Tom Ellen and file 2 David|0010|testnamez|resultsz David|0004|testnamex|resultsx Tom|0010|testnamez|resultsz Tom|0004|testnamex|resultsx Ellen|0010|testnamez|resultsz... (12 Replies)
Discussion started by: A-V
12 Replies

10. Shell Programming and Scripting

In PErl script: need to read the data one file and generate multiple files based on the data

We have the data looks like below in a log file. I want to generat files based on the string between two hash(#) symbol like below Source: #ext1#test1.tale2 drop #ext1#test11.tale21 drop #ext1#test123.tale21 drop #ext2#test1.tale21 drop #ext2#test12.tale21 drop #ext3#test11.tale21 drop... (5 Replies)
Discussion started by: Sanjeev G
5 Replies
UNMASS(1)						      General Commands Manual							 UNMASS(1)

NAME
unmass - extract game archive files SYNOPSIS
unmass [options] file DESCRIPTION
This manual page documents briefly the unmass command. unmass is a tool to extract game archives. It supports the following archive types: Crismon Land, Baldur's Gate 2, Civilization 4, Doom (WADs), Dune 2, Etherlords 2, Final Fantasy 7 and 8, Flashpoint, Knights of Xentar, Metal Gear Solid (DARs), Moorhuhn 2 and 3, Megaman Leg- ends, Oni, Operation Flashpoint, Princess Maker 2, Quake 1, RollCage, Swine, Unreal Tournament umods, Virtua Fighter bitmaps, MEA exe's, some economy file format. OPTIONS
-h, --help Show summary of options. -e <archive file> <file name> [...<file name>] Opens the archive and extract files. --modules Prints out list of modules for archive loading. --list <archive file> Opens the archive and prints list of the files inside. EXAMPLES
Display list of files contained inside archive 'battle.lgp' unmass -list battle.lgp Opens 'battle.lgp' and extracts file 'aabc.txt' and all files ending with 'dat' into current directory unmass -e battle.lgp aabc.txt *dat SEE ALSO
pak(1). AUTHOR
unmass was written by Miro Janosik. This manual page was written by Gurkan Sengun <gurkan@phys.ethz.ch>, for the Debian project (but may be used by others). July 9, 2007 UNMASS(1)
All times are GMT -4. The time now is 10:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy