Sponsored Content
Full Discussion: File compare in UNIX
Top Forums Shell Programming and Scripting File compare in UNIX Post 302956587 by RudiC on Thursday 1st of October 2015 08:23:34 AM
Old 10-01-2015
Please use code tags as required by forum rules!

Code:
awk '
FNR==NR         {split ($2, T, ".")
                 VN[$1]=T[1]*10000+T[2]*100+T[3]
                 next
                }
                {X=$2
                 gsub ("[][]", "", X)
                 split (X, T, "[].[]")
                 NN=T[1]*10000+T[2]*100+T[3]
                }

!($1 in VN) ||
 (NN > VN[$1])

' file2 file1
com.acc.invm:FNS_TEST_DCCC_Mangment [94.1.6]
com.acc.invm:SendEmail [29.6.113]
com.acc.invm:SendSms [12.23.65]

 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Help- Unix File Compare- Struggling

I had posted this earlier about 3 weeks ago and had recieved a response and I did sort both the files and the comm command is still not working. Can someone please assist me, I would really appreciate it. Below is what I am trying to do I need to compare File A with File B and create FILE C... (2 Replies)
Discussion started by: guiguy
2 Replies

2. Programming

compare XML/flat file with UNIX file system structure

Before i start doing something, I wanted to know whether the approach to compare XML file with UNIX file system structure. I have a pre-configured file(contains a list of paths to executables) and i need to check against the UNIX directory structure. what are the various approches should i use ? I... (6 Replies)
Discussion started by: shafi2all
6 Replies

3. Shell Programming and Scripting

Unix script to compare the two file

Hi, I want to compare two | delimited files.Awk is not working in my unix box.So plz give alternate solutions. Please see the below code: file1=$1 file2=$2 num_of_records_file1=`awk ' END { print NR } ' $file1` num_of_records_file2=`awk ' END { print NR } ' $file2` i=1 while do... (4 Replies)
Discussion started by: autosys_nm
4 Replies

4. Shell Programming and Scripting

Compare two files in UNIX

Hi, I have two files File1 Contents: abc dcf sdc File2 Contents: dcf sdc erg Now my program should return the contents existing in File1 but not in File2. In this case output shoud be "abc" as abc is not available in File 2. It should not return "erg" by saying it is... (4 Replies)
Discussion started by: forums123456
4 Replies

5. Homework & Coursework Questions

Compare to values in a file in unix

Here is sample file ===============Index 0=================== isActive=0, Input=1, Output=1, Status=1 State = Future , PRIMARY UnderCount=2 inCount=2 outCount=0 SCount=673 -- ===============Index 1=================== isActive=0, Input=1, Output=1, Status=1 ... (1 Reply)
Discussion started by: sooda
1 Replies

6. UNIX for Dummies Questions & Answers

Compare two file in UNIX

Hi, how to compare all the differences from two files in unix ? plz provide the screenshots. Thanks, Dasaradha (1 Reply)
Discussion started by: dasaradha
1 Replies

7. Shell Programming and Scripting

Compare output of UNIX command and match data to text file

I am working on an outage script and I run a command from the command line which tells me the amount of generator failures in my market. The output of this command only gives me three digits to identify the site by. I have a master list of all sites in a separate file, call it list.txt. If my... (7 Replies)
Discussion started by: jbrass
7 Replies

8. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
IDFETCH(1)						     NCBI Tools User's Manual							IDFETCH(1)

NAME
idfetch - retrieve biological data from the NCBI ID1 server SYNOPSIS
idfetch [-] [-F str] [-G filename] [-Q filename] [-c N] [-d str] [-e N] [-f str] [-g N] [-i N] [-l filename] [-n] [-o filename] [-q str] [-s str] [-t N] DESCRIPTION
idfetch is a client for NCBI's ID1 server, which contains a large database of annotated biological sequences. OPTIONS
A summary of options is included below. - Print usage message -F str Add the specified feature types (comma-delimited); allowed values are CDD, SNP, SNP_graph, MGC, HPRD, STS, tRNA, and microRNA. -G filename File with list of GIs, (versioned) accessions, FASTA SeqIDs to dump -Q filename Generate GI list by Entrez query in filename; requires -dn or -dp. -c N Max complexity: 0 get the whole blob (default) 1 get the bioseq of interest 2 get the minimal bioseq-set containing the bioseq of interest 3 get the minimal nuc-prot containing the bioseq of interest 4 get the minimal pub-set containing the bioseq of interest -d str Database to use (with -q, can be either n for nucleotides or p for proteins). -e N Entity number (retrieval number) to dump -f str Flattened SeqId. Possible formats: type([name][,[accession][,[release][,version]]]) as '5(HUMHBB)' type=accession type:number (type is a number indicating the ASN.1 Seq-id subtype.) -g N GI id for single Entity to dump -i N Type of lookup: 0 get Seq-entry (default) 1 get GI state (output to stderr) 2 get SeqIds 3 get GI history (sequence change only) 4 get revision history (any change to ASN.1) -l filename Log file -n Output only the list of GIs (with -q and -Q). -o filename Filename for output (default = stdout) -q str Generate gi list by Entrez query. Requires -dn or -dp. -s str FASTA style SeqId ENCLOSED IN QUOTES. Formats: lcl|int or str bbs|int bbm|int gb|acc|loc emb|acc|loc pir|acc|name sp|acc|name pat|country|patent|seq gi|int dbj|acc|loc prf|acc|name pdb|entry|chain -t N Output type: 1 text ASN.1 (default) 2 binary ASN.1 3 GenBank (Seq-entry only) 4 GenPept (Seq-entry only) 5 FASTA (table for history) 6 quality scores (Seq-entry only) 7 Entrez DocSums 8 FASTA reverse complement AUTHOR
The National Center for Biotechnology Information. NCBI
2011-09-02 IDFETCH(1)
All times are GMT -4. The time now is 04:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy