Sponsored Content
Top Forums Shell Programming and Scripting Help to retrieve data from two files matching a string Post 302558241 by shaliniyadav on Friday 23rd of September 2011 06:31:12 AM
Old 09-23-2011
@jayan_jay : Thanks a lot.. It does work for entries if exists in datafile, if it doesnt match then getting error --

Code:
 
919968531998 00 0A 02 48 4A 6B 92 01 58 06 5E 00 404686600667311
grep: RE error 41: No remembered search string.
7878787878787 
919968754673 00 0A 01 4A FB A6 C4 01 CD 0E 9A 00 404686600708986

In actual file their are millions of lines...

@ygemi: Thanks a lot , i wil check and get back to you Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Retrieve data from a file

Hello guys I want to retrieve two data from a file, like this: bash-2.03$ cat numtest 123456 123457 bash-2.03$ more ./test_num #!/bin/bash num1= num2= cnt=1 while read x do num${cnt}=$x cnt=$(($cnt+1)) done <$1 echo $num1 "\n" $num2 But when i executed this script, error... (2 Replies)
Discussion started by: tpltp
2 Replies

2. Shell Programming and Scripting

matching string in two files of different length

Dear all, I have the following problem (it originates in the domain of bio-inf, but it is a general problem). I have two files of one column each and of different length: a.txt and b.txt. a.txt contains alphanumeric strings (around 30 digit) and there are 300 rows b.txt contains alphanumeric... (2 Replies)
Discussion started by: ad_meis
2 Replies

3. Programming

How to find the matching data b/w 2 files in perl?

Hi friends,, i have find the matching data between 2files. My file1 have a data like rs3001336 rs3984736 rs2840532 File2 have a data like rs3736330 1 2359237 A G 0.28 1.099 0.010 rs2840532 1 2359977 G A 0.363 0.3373 1.123 rs3001336 1 2365193 G A 0.0812 0.07319 1.12 ... (1 Reply)
Discussion started by: sureshraj
1 Replies

4. Shell Programming and Scripting

How to find the matching data b/w 2 files in perl?

Hi friends,, i have find the matching data between 2files. My file1 have a data like rs3001336 rs3984736 rs2840532 File2 have a data like rs3736330 1 2359237 A G 0.28 1.099 0.010 rs2840532 1 2359977 G A 0.363 0.3373 1.123 rs3001336 1 ... (4 Replies)
Discussion started by: sureshraj
4 Replies

5. Shell Programming and Scripting

search string in a file and retrieve 10 lines including string line

Hi Guys, I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same. can anyone of you please let me know how to go about it ? (8 Replies)
Discussion started by: sukrish
8 Replies

6. Shell Programming and Scripting

Matching string on two files based on match rules.

Hi, How to check if a string on file2 exactly matches with a part or complete string on file1, and return a match indicator based on some match rules. 1) only records on file1 with category A should be matched. for other category, the output match indicator should default to 'N' 2) on file2... (13 Replies)
Discussion started by: effay
13 Replies

7. Shell Programming and Scripting

Compare two files and get matching data

Hi, Can anyone help me to compare two files and get the matching data... say i have file1 and file2 ... file1 has 300 unique data with that i need to match with file2 to see how may are matching.. file2 have 1000 records. (4 Replies)
Discussion started by: zooby
4 Replies

8. Shell Programming and Scripting

Compare columns of two files and retrieve data

Hi guys, I need your help. I have two files: file1 1 3 5 file2 1,XX 2,AA 3,BB 4,CC 5,DD I would like to compare the first column and where they are equal to write that output in a new file: 1,XX 3,BB (7 Replies)
Discussion started by: apenkov
7 Replies

9. Shell Programming and Scripting

How can I retrieve the matching records from data file mentioned?

XYZNA0000778800Z 16123000012300321000000008000000000000000 16124000012300322000000007000000000000000 17234000012300323000000005000000000000000 17345000012300324000000004000000000000000 17456000012300325000000003000000000000000 9 XYZNA0000778900Z 16123000012300321000000008000000000000000... (8 Replies)
Discussion started by: later_troy
8 Replies

10. Shell Programming and Scripting

Field matching in two data files

Hello, I am looking to output all of the lines from file2 whose 11th field is present in the first field in file1. Then the second field from file1 should be appended as such: file1: 2222 0.35 4444 0.25 5555 0.75 file2: col1 col2 col3 col4 col5 col6 col7 col8 col9 col10 1111 col1 col2... (4 Replies)
Discussion started by: palex
4 Replies
VZTMINER(1)						       Dumpfile Data Mining						       VZTMINER(1)

NAME
vztminer - Data mining of VZT files SYNTAX
vztminer [option]... [VZTFILE] DESCRIPTION
Mines VZT files for specific data values and generates gtkwave save files to stdout for future reload. OPTIONS
-d,--dumpfile <filename> Specify VZT input dumpfile. -m,--match <value> Specifies "bitwise" match data (binary, real, string) -x,--hex <value> Specifies hexadecimal match data that will automatically be converted to binary for searches -n,--namesonly Indicates that only facnames should be printed in a gtkwave savefile compatible format. By doing this, the file can be used to specify which traces are to be imported into gtkwave. -c,--comprehensive Indicates that results are not to stop after the first match. This can be used to extract all the matching values in the trace. -h,--help Show help screen. EXAMPLES
vztminer dumpfile.vzt --hex 20470000 -n This attempts to match the hex value 20470000 across all facilities and when the value is encountered, the facname only is printed to std- out in order to generate a gtkwave compatible save file. LIMITATIONS
vztminer only prints the first time a value is encountered for a specific net. This is done in order to cut down on the size of output files and to aid in following data such as addresses through a simulation model. Note also that the reader algorithm attempts to recon- struct bitblasted nets back into their original vectors but this is not always successful, specifically in the case where the individual bitstrands are dumped in non-sequential order. AUTHORS
Anthony Bybell <bybell@rocketmail.com> SEE ALSO
lxt2miner(1) vzt2vcd(1) lxt2vcd(1) vcd2lxt2(1) gtkwave(1) Anthony Bybell 3.2.1 VZTMINER(1)
All times are GMT -4. The time now is 04:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy