Sponsored Content
Top Forums Shell Programming and Scripting Extracting data based on the list file Post 302445800 by rdcwayx on Tuesday 17th of August 2010 01:50:18 AM
Old 08-17-2010
Code:
grep -f list.txt item.txt

 

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
ICUPKG(8)							 ICU 50.1.2 Manual							 ICUPKG(8)

NAME
icupkg - extract or modify an ICU .dat archive SYNOPSIS
icupkg [ -h, -?, --help ] [ -tl, --type l | -tb, --type b | -te, --type e ] [ -c, --copyright | -C, --comment comment ] [ -a, --add list ] [ -r, --remove list ] [ -x, --extract list ] [ -l, --list ] [ -s, --sourcedir source ] [ -d, --destdir destination ] [ -w, --writepkg ] [ -m, --matchmode mode ] infilename [ outfilename ] DESCRIPTION
icupkg reads the input ICU .dat package file, modify it according to the options, swap it to the desired platform properties (charset & endianness), and optionally write the resulting ICU .dat package to the output file. Items are removed, then added, then extracted and listed. An ICU .dat package is written if items are removed or added, or if the input and output filenames differ, or if the -w, --writepkg option is set. If the input filename is "new" then an empty package is created. If the output filename is missing, then it is automatically generated from the input filename. If the input filename ends with an l, b, or e matching its platform properties, then the output filename will con- tain the letter from the -t, --type option. This tool can also be used to just swap a single ICU data file, replacing the former icuswap tool. For this mode, provide the infilename (and optional outfilename) for a non-package ICU data file. Allowed options include -t, -w, -s and -d The filenames can be absolute, or relative to the source/dest dir paths. Other options are not allowed in this mode. OPTIONS
-h, -?, --help Print help about usage and exit. -tl, --type l Output for little-endian/ASCII charset family. The output type defaults to the input type. -tb, --type b Output for big-endian/ASCII charset family. The output type defaults to the input type. -te, --type e Output for big-endian/EBCDIC charset family. The output type defaults to the input type. -c,--copyright Include the ICU copyright notice in the resulting data. -C, --comment comment Include the specified comment in the resulting data instead of the ICU copyright notice. -a, --add list Add items from the list to the package. The list can be a single filename with a .txt file extension containing a list of item file- names, or an ICU .dat package filename. -r, --remove list Remove items from the list from the package. The list can be a single filename with a .txt file extension containing a list of item filenames, or an ICU .dat package filename. -x, --extract list Extract items from the list from the package. The list can be a single filename with a .txt file extension containing a list of item filenames, or an ICU .dat package filename. -m, --matchmode mode Set the matching mode for item names with wildcards. -s, --sourcedir source Set the source directory to source. The default source directory is the current directory. -d, --destdir destination Set the destination directory to destination. The default destination directory is the current directory. -l, --list List the package items to stdout (after modifying the package). LIST FILE SYNTAX
Items are listed on one or more lines and separated by whitespace (space+tab). Comments begin with # and are ignored. Empty lines are ignored. Lines where the first non-whitespace character is one of "%&'()*+,-./:;<=>?_ are also ignored to reserve for future syntax. Items for removal or extraction may contain a single * wildcard character. The * matches zero or more characters. If -m, --matchmode noslash is set, then the * character does not match the / character. Items must be listed relative to the package, and the --sourcedir or the --destdir path will be prepended. The paths are only prepended to item filenames while adding or extracting items, not to ICU .dat package or list filenames. Paths may contain / instead of the platform's file separator character and are converted as appropriate. AUTHORS
Markus Scherer George Rhoten VERSION
1.0 COPYRIGHT
Copyright (C) 2006 IBM, Inc. and others. SEE ALSO
pkgdata(1) genrb(1) ICU MANPAGE
18 August 2006 ICUPKG(8)
All times are GMT -4. The time now is 02:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy