Sponsored Content
Top Forums Shell Programming and Scripting Kindly check it: Camparison of files only column1 of 2 files Post 302677909 by manigrover on Thursday 26th of July 2012 11:49:37 PM
Old 07-27-2012
Kindly check it: Camparison of files only column1 of 2 files

Hi all,

I have 2 files in which i have to find commom entries in column 1 an dif soemthing is common write other data of both files in front of it mentioned.

Gene symbol and disease name

Code:
column 1    column2
ARFGEF2 CAD
DDEF2 CAD
PSCD3 CAD
PSCD4 CAD
CAMK1 CAD,HT,HT,HT,HT,HT,HT,HT,HT,HT,HT,HT,HT
HSP90AA1 CAD,CAD,CAD,T2D,T2D
KDR CAD,CD,CD
VEGF CAD,CAD,CAD,CAD,T2D,T2D,T2D
CTNNA3 CAD,HT,T2D
PTPRM CAD,T2D
RAC2 CAD,CAD,T1D,T1D
SMAD3 CAD,T2D,T2D,T2D,T2D,T2D,T2D,T2D
SORBS1 CAD,CAD,CAD
CD36 CAD
IRS1 CAD,CAD,CAD
IRS2 CAD,CAD,CAD,CAD
MTFMT CAD,CAD,CAD,T1D,T1D,T1D
SARS CAD
GNPDA2 CAD
NANS CAD
SRD5A1 CAD

Second file with 3 colu

second file is like this


Gene symbol drug drug
Code:
F2        Lepirudin    Refludan
FCGR2A,FCGR2B,FCGR2C,EGFR,FCGR3B,C1R,C1QA,C1QB,C1QC,FCGR3A,C1S,FCGR1A        Cetuximab    Erbitux
Not Available        Dornase Alfa    Pulmozyme
IL2RA,IL2RB,IL2RG        Denileukin diftitox    Ontak
C1S,C1R,C1QA,C1QB,C1QC,TNF,TNFRSF1B,FCGR1A,FCGR3A,FCGR2A,FCGR2B,FCGR2C,LTA,FCGR3B        Etanercept    Enbrel
F2        Bivalirudin    Angiomax
GNRHR        Leuprolide    Eligard
IFNAR2,IFNAR1        Peginterferon alfa-2a    Pegasys
PLG,FGA,PLAUR,SERPINE1        Alteplase    Activase (Genentech Inc

The expected out put contain
Code:
common entries of first column                        disease from first file                         drug from second file                drug from second file


Last edited by Scott; 07-27-2012 at 03:04 AM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comparing 2 files - kindly assist expert

Hi, I'm new in shell scripting and would like u guys to help on this. OS: Solaris 9 currently, i have 2 files. file1: hello hi test god file2: hi hello file1 is my masterfile, and i wanted to print out string that are in file1 and NOT in file2 and send out a mail (with the... (15 Replies)
Discussion started by: chew
15 Replies

2. Shell Programming and Scripting

check how many files in folder or total files in folder

Hi all, I have copied all my files to one folder.and i want to check how many files (count) in the folder recently moved or total files in my folder? please send me the query asap. (3 Replies)
Discussion started by: durgaprasad
3 Replies

3. Shell Programming and Scripting

How to check files and move the results to differents files?

Hi, I am a newbie to shell scripting. here is my objective: 1)The shell program should take 2 parameters - ie-> DestinationFolder, WebFolder 2)Destination folder contains few files that has to has be verified and deleted. 3)WebFolder is a folder containing a list of master files 4)It... (1 Reply)
Discussion started by: sandhyagupta
1 Replies

4. Shell Programming and Scripting

How to change value in CSV columns and compare two files where Column1 is identical

Hi all, Could someone help me with the following issue: 1st I have an CSV file delimiter is ";" I I have a column 7 where I need to do some multiple mathem. operation, I need all values in this columns to be multiplied by 1.5 and create a new CSV file with the replaced values. 2nd. I... (3 Replies)
Discussion started by: kl1ngac1k
3 Replies

5. Shell Programming and Scripting

need a shell script to extract the files from source file and check whether those files existonserve

Hi, I am new to shell scripting.Please help me on this.I am using solaris 10 OS and shell i am using is # echo $0 -sh My requirement is i have source file say makefile.I need to extract files with extensions (.c |.cxx |.h |.hxx |.sc) from the makefile.after doing so i need to check whether... (13 Replies)
Discussion started by: muraliinfy04
13 Replies

6. Shell Programming and Scripting

Perl code to check date and check files in particular dir

Hi Experts, I am checking how to get day in Perl. If it is “Monday” I need to process…below is the pseudo code. Can you please prove the code for below condition. if (today=="Monday" ) { while (current_time LESS THAN 9:01 AM) ... (1 Reply)
Discussion started by: ajaypatil_am
1 Replies

7. Shell Programming and Scripting

Kindly check:remove duplicates with similar data in front of it

Hi all, I have 2 files containing data like this: so if there is same entry repeated in the column like1,2,3,4 I have to check if there is different entries column like 2,4 but similar entries for duplicatein column 2 like1,3 the output shuld be like this for first file ... (5 Replies)
Discussion started by: manigrover
5 Replies

8. Shell Programming and Scripting

common entries of first column in 2 or 3 files:kindly check

Hi all, I have 3 files with such data first files second file third file I have to find common entries of first column in two ways 1) between 2 files (2 Replies)
Discussion started by: manigrover
2 Replies

9. Shell Programming and Scripting

Check files and archive the files using sftp

Hi, I have to check the files in another server using sftp to do that, below is the code i am going with #!/bin/bash export SRC_FOLDER=$1 export ARC_FOLDER=$2 HOST=as07u3456 USER=relfag sftp ${USER}@${HOST} <<EOF cd $SRC_FOLDER/DSCOR ls bye EOF echo "done" whatever the files i... (8 Replies)
Discussion started by: ursrami
8 Replies

10. Shell Programming and Scripting

How to get CRC check sum of files in java EAR file without extracting .jar/.war files to disk.?

unzip -v gives CRC info of each file in a zip(in my case .EAR) file. # unzip -v my-application.ear Archive: my-application.ear Length Method Size Cmpr Date Time CRC-32 Name -------- ------ ------- ---- ---------- ----- -------- ---- 197981 Defl:N 183708 7%... (1 Reply)
Discussion started by: kchinnam
1 Replies
VFS_CATIA(8)						    System Administration tools 					      VFS_CATIA(8)

NAME
vfs_catia - translate illegal characters in Catia filenames SYNOPSIS
vfs objects = catia DESCRIPTION
This VFS module is part of the samba(7) suite. The Catia CAD package commonly creates filenames that use characters that are illegal in CIFS filenames. The vfs_catia VFS module implements a character mapping so that these files can be shared with CIFS clients. This module is stackable. The parameter "catia:mappings" specifies the mapping on a per-character basis, see below. OPTIONS
catia:mappings = SERVER_HEX_CHAR:CLIENT_HEX_CHAR SERVER_HEX_CHAR specifies a 0x prefixed hexedecimal character code that, when included in a Samba server-side filename, will be mapped to CLIENT_HEX_CHAR for the CIFS client. The same mapping occurs in the opposite direction. Multiple character mappings are separated by a comma. EXAMPLES
Map server-side quotation-marks (") to client-side diaeresis (") on filenames in the [CAD] share: [CAD] path = /data/cad vfs objects = catia catia:mappings = 0x22:0xa8 Perform comprehensive mapping of common Catia filename characters: [CAD] path = /data/cad vfs objects = catia catia:mappings = 0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3c:0xab,0x3e:0xbb,0x3f:0xbf,0x5c:0xff,0x7c:0xa6 Server-side filename to be translated (Note that the path delimiter "/" is not used here): aa:a*a?a"a<a>a|a Resulting filename, as seen by the client: aya-:-axaca"a<<a>>a|a CAVEATS
Character mapping must work in BOTH directions (server -> client and client -> server) to get unique and existing file names! A NOT working example: [CAD] path = /data/cad vfs objects = catia catia:mappings = 0x3a:0x5f Here the colon ":" is mapped to the underscore "_". Assuming a server-side filename "a:should_work", which is translated to "a_should_work" for the client. BUT the reverse mapping from client "a_should_work" to server will result in "a:should:work" - something like "file not found" will be returned. VERSION
This man page is correct for Samba versions from 3.5.0 to 4.0.6. AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. New version written by Guenter Kukkukk kukks@samba.org Samba 4.0 06/17/2014 VFS_CATIA(8)
All times are GMT -4. The time now is 08:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy