07-18-2011
Comparison of fields in Files
Hello,
I have two files with tab delimited data. The file will contain details something like below:
FILENAME.A.B.C. 3 5 VALID PROCESSED
I would have a bench mark file. I would be getting new files of the same format. My requirement is to compare a particular field for a particular filename and give out whether it matches to the benchn mark or not.
For Instance, I may need to check the validity count for a filename xyz. First I need to search for the filename xyz in the bench mark file and find the valid count, then search the filename xyz in the input file and see with the valid count matches.
I hope I am clear on what is required. Please let me know the best way this can be achieved using shell scripting. Is there any UNIX commands to handle this kind of comparsion??
Thanks a lot in advance.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Kindly help on follows.
I have 2 files. One file contains only one column of mobile numbers. And total records in a file 12 million. Second file contains 2 columns mobile numbers and balance. and total records 30 million. I want to find out balance of each data in file 1 corresponding to file 2.... (2 Replies)
Discussion started by: kamal_418
2 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I would like to know if we can compare binary(non text) files in unix
eg. exes
Thanks
Saurabh (3 Replies)
Discussion started by: smehra_20
3 Replies
3. Shell Programming and Scripting
Hi,
I have a problem with comparison of two files
file1
20100101
20090101
20080101
20071001
20121229
file2
19990112 12 456 7
20011131 19
20100101 2 567 1 987
17890709 123 555
and, sh script needs to compare of these two files and give out to me result:
20100101 2 567 1 987
it... (5 Replies)
Discussion started by: shizik
5 Replies
4. Shell Programming and Scripting
Hi ,
I'm trying to compare fields in the file, I want compare the numbers in each column and get the least value of it.
> cat input_file
0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000
-0.2050 -0.6629 -0.6407 -0.6599
-0.4085 -0.3959 -0.2526 -0.3597
0.3439 0.2275 0.2780 ... (5 Replies)
Discussion started by: novice_man
5 Replies
5. Shell Programming and Scripting
Hi everybody (first time posting here)
I have a file1 that looks like >
1,101,0.1,0.1
1,26,0.1,0.1
1,3,0.1,0.1
1,97,0.5,0.5
1,98,8.1,0.218919
1,99,6.2,0.248
2,101,0.1,0.1
2,24,3.1,0.147619
2,25,23.5,0.559524
2,26,34,0.723404with 762 lines..
I have another 'similar' file2 >
... (10 Replies)
Discussion started by: murpholinox
10 Replies
6. Shell Programming and Scripting
Hi all
I have two files which I have to compare that whetehr there is soemthing common or not
body, div, table, thead, tbody, tfoot, tr, th, td, p { font-family: "Liberation Sans"; font-size: x-small; }
body, div, table, thead, tbody, tfoot,... (2 Replies)
Discussion started by: manigrover
2 Replies
7. Shell Programming and Scripting
Hi,
i have a scenario were i should compare a few fields from each line then increment a variable based on that.
Example file
989878|8999|Y|0|Y|N|V
989878|8999|Y|0|N|N|V
989878|8999|Y|2344|Y|N|V
i have 3 conditions to check and increment a variable on every line
condition 1 if ( $3... (4 Replies)
Discussion started by: selvankj
4 Replies
8. Shell Programming and Scripting
Hello All,
I have many zipped XMLs (example file name in tgz formate - file_rec.trx.2016-01-23.000123.exc.85sesdzd45wsds5299c8f2994f7.tgz) looks following and I need to verify two numbers, they are RecordNumber and EnrolData (only sequence number, NOT hole).
for all the records, both should be... (5 Replies)
Discussion started by: VasuKukkapalli
5 Replies
9. Shell Programming and Scripting
I have the requirement
I have two files
cat fileA
something
anythg
nothing
everythg
cat fileB
everythg
anythg
Now i shld use fileB and compare every line at fileA and get the output as
something
nothing (3 Replies)
Discussion started by: Priya Amaresh
3 Replies
10. UNIX for Beginners Questions & Answers
Hi,
Below are the sample files. x.txt is from an Excel file that is a list of users from Windows and y.txt is a list of database account.
$ head -500 x.txt y.txt
==> x.txt <==
TEST01 APP_USER_PROFILE
USER03 APP_USER_PROFILE
TEST02 APP_USER_EXP_PROFILE
TEST04 APP_USER_PROFILE
USER01 ... (3 Replies)
Discussion started by: newbie_01
3 Replies
LEARN ABOUT DEBIAN
asnval
ASNVAL(1) NCBI Tools User's Manual ASNVAL(1)
NAME
asnval - validate ASN.1 biological sequence records
SYNOPSIS
asnval [-] [-A] [-B] [-C N] [-D] [-E str] [-F] [-G] [-J] [-K] [-L filename] [-M] [-N flags] [-P N] [-Q N] [-R N] [-S N] [-T] [-U] [-X] [-Y]
[-Z] [-a type] [-b] [-c] [-d path] [-e] [-f str] [-i filename] [-k] [-l] [-o filename] [-p path] [-q] [-r] [-u] [-v N] [-x str]
DESCRIPTION
asnval is a command-line tool to validate ASN.1-format biological sequence records.
OPTIONS
A summary of options is included below.
- Print usage message
-A Validate Alignments
-B Validate Barcodes
-C N Max count
-D Disable message suppression
-E str Only Error Code to Show
-F Test network access
-G GI lookup from accession
-J Require ISO-JTA?
-K Summary to error file
-L filename
Log File
-M Match locus_tag against General ID
-N flags
Latitude-longitude / country flags
0 none
1 test state/province
2 ignore water exception
3 both of the above
-P N Highest severity for error to show:
0 none
1 informational
2 warning
3 error (default for -Q)
4 grounds for rejection (default for -P, -R)
-Q N Lowest severity for error to show, per P
-R N Severity for error in return code, per P
-S N Skip count
-T Use Threads
-U Genome center submission
-X Exon splice check
-Y Check against old IDs
-Z Remote CDS product fetch
-a type
Input ASN.1 type:
a Automatic (default)
c Catenated
z Any
e seq-Entry
b Bioseq
s bioseq-Set
m seq-subMit
t baTch bioseq-set
u batch seq-sUbmit
-b Batch file is Binary
-c Batch file is Compressed
-d path
Path to Indexed Binary ASN.1 Data
-e Ignore transcription/translation Exceptions
-x str Substring filter
-i filename
Single input file (standard input by default)
-k Local fetching
-l Lock components in advance
-o filename
Single output file
-p path
Path to ASN.1 Files
-q Taxonomy lookup
-r Remote Fetching from ID
-u Recurse
-v N Verbosity:
1 Standard report (default)
2 Accession / severity / code (space delimited)
3 Accession / severity / code (tab delimited)
4 XML report
5 Accession / GI / severity / code (tab delimited)
-x str File selection substring (.ent by default)
AUTHOR
The National Center for Biotechnology Information.
SEE ALSO
asndisc(1), cleanasn(1), sequin(1).
NCBI
2012-06-24 ASNVAL(1)