Sponsored Content
Top Forums Shell Programming and Scripting Separate certain entries from a very big file Post 302639973 by Chubler_XL on Sunday 13th of May 2012 11:07:46 PM
Old 05-14-2012
How about this then:

Code:
awk '
/^#*BEGIN_/{gsub(/^#*BEGIN_/,"",$0);gsub(/\n/,"",$0);N=$0;A=x}
A&&/^ Drug_Target_[1-9]*_(Gene_Name|GenBank_ID_Protein)/&&gsub(/\n/,"",$0) { print "# " $0 }
N&&/^ Drug_Target_[1-9]*_GenBank_ID/{gsub(/\n/,"",$0);print N,$0; N=x;A=1}' RS='\n#' infile

 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to view a big file(143M big)

1 . Thanks everyone who read the post first. 2 . I have a log file which size is 143M , I can not use vi open it .I can not use xedit open it too. How to view it ? If I want to view 200-300 ,how can I implement it 3 . Thanks (3 Replies)
Discussion started by: chenhao_no1
3 Replies

2. UNIX for Dummies Questions & Answers

How big is too big a config.log file?

I have a 5000 line config.log file with several "maybe" errors. Any reccomendations on finding solvable problems? (2 Replies)
Discussion started by: NeedLotsofHelp
2 Replies

3. Shell Programming and Scripting

Extract certain entries from big file:Request to check

Hi all I have a big file which I have attached here. And, I have to fetch certain entries and arrange in 5 columns Name Drug DAP ID disease approved or notIn the attached file data is arranged with tab separated columns in this way: and other data is... (2 Replies)
Discussion started by: manigrover
2 Replies

4. Shell Programming and Scripting

Count and separate entries with N/A mentioned in front

Hi all, I have afile with following data I want to separate, count the entries with N/A in front of it so I will have all the entries with N/A in front seprate file . so output shuld be (7 Replies)
Discussion started by: manigrover
7 Replies

5. Shell Programming and Scripting

separate old entries

Hi I have a file Stomach qwe wer qwew Liver sdfjk shdf jkasfhd I want expected out shuld be in such a way that bold letters shuld comein front of non bold letter qwe Stomach wer Stomach qwew Stomach sdfjk Liver shdf Liver... (8 Replies)
Discussion started by: manigrover
8 Replies

6. Shell Programming and Scripting

Separate Entries after comma

Hi All I need help to separate entries after commas in my I have 2 columns in my file like this Ramush, Shyam, Mohan First Ram, Mohan, Kaavya Second, Fourth Kavi, Ram, Shaym, Mohan Third I ahve to separate entries after comma in a separate row... (9 Replies)
Discussion started by: kareena
9 Replies

7. Shell Programming and Scripting

Match first column and separate entries

Hi I have 2 big files containing following information: file 1 12345 345634 217341 87234693 8236493 file 2: 12345 1237 (6 Replies)
Discussion started by: kaav06
6 Replies

8. Shell Programming and Scripting

Print the overlapping entries in 2 files to separate file

I have two files that contain overlapping positions. i want to put them together each overlapping entries in both files in to a new file (the entries of first file first and the entries of second file next) followed by blank line then next overlapping entries and so on. input1 chr1 22 ... (10 Replies)
Discussion started by: raj_k
10 Replies
DXmSvnGetHighlighted(3X)												  DXmSvnGetHighlighted(3X)

NAME
DXmSvnGetHighlighted - Retrieves (returns) a list of entries currently highlighted by the user. SYNOPSIS
void DXmSvnGetHighlighted( Widget widget, int *entries(), XtPointer *tags(), int len ); PARAMETERS
The identifier (widget ID) of the SVN widget. A pointer to an array of integers to receive the highlighted entry numbers. A pointer to an array of longwords to receive the application's entry_tag value for each highlighted entry. If tags are not required, a null pointer may be passed. An integer that represents the number of entries allocated in the provided array. DESCRIPTION
The DXmSvnGetHighlighted routine returns a list of entries that are currently highlighted by the user. Make this call in your application between calls to DXmSvnDisableDisplay and DXmSvnEnableDisplay to ensure that the highlighted list is not changing. The application is responsible for managing the memory used to return this list of highlighted entries. As such, note the following: At the minimum, the number of entries in the array should be capable of holding the number of entries indicated by the value returned from the DXmSvnGetNumHighlighted routine. If there are more entries in the array than the application will need, the SVN widget will set the value for those extra entries to 0. If the capacity of the arrays passed is less than the number of selected entries, only the number of entries allocated in the provided array (the value for len) will be returned. DXmSvnGetHighlighted(3X)
All times are GMT -4. The time now is 05:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy