Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
> Using GREP on multiple files, compiling a table using data from different files with same extension
dmatrix1
post Sep 10 2012, 07:17 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 10-September 12
Member No.: 17,827



I am working with a bunch of Protein Database Files (.pdb) which contain information in the following pattern:

HEADER OXIDOREDUCTASE 26-FEB-12 4DWV
TITLE HORSE ALCOHOL DEHYDROGENASE COMPLEXED WITH NAD+ AND 2,3,4,5,6-
TITLE 2 PENTAFLUOROBENZYL ALCOHOL
COMPND MOL_ID: 1;
COMPND 2 MOLECULE: ALCOHOL DEHYDROGENASE E CHAIN;
COMPND 3 CHAIN: A, B;
COMPND 4 EC: 1.1.1.1
SOURCE MOL_ID: 1;
SOURCE 2 ORGANISM_SCIENTIFIC: EQUUS CABALLUS;
SOURCE 3 ORGANISM_COMMON: DOMESTIC HORSE,EQUINE;
SOURCE 4 ORGANISM_TAXID: 9796;
SOURCE 5 ORGAN: LIVER
KEYWDS ALCOHOL DEHYDROGENASE, NAD+, PENTAFLUOROBENZYL ALCOHOL, MICHAELIS
KEYWDS 2 COMPLEX, ROSSMANN FOLD, OXIDOREDUCTASE
EXPDTA X-RAY DIFFRACTION
AUTHOR B.V.PLAPP,S.RAMASWAMY
REVDAT 3 27-JUN-12 4DWV 1 JRNL
REVDAT 2 16-MAY-12 4DWV 1 JRNL
REVDAT 1 11-APR-12 4DWV 0

What I want to do is GREP out the line with the TITLE, AUTHOR, COMPND, SOURCE, REVDAT. I am using grep ^TITLE to get the title. THE PROBLEM: the ^ will not work for the compound name as it is not listed in the first occurrence. How can I write a script to grep out the second occurrence?
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 16th October 2017 - 09:13 PM