help to print all the contents under chosen records in perl
Hi,
I have a file in which I have to separate genes from phenotype data. I have written a program as given below which prints just the gene records.
1. But I want to print all the data under each specified record to the output file. So the file has all the data like for every record. An example of a record with all the data is given below.
2.The program below gives me only the gene list but I want all the data as given below also in my output file. Every separate record starts with the line *RECORD*.
[
]
Last edited by Scrutinizer; 05-12-2012 at 02:05 PM..
Reason: code tags
I have the following questions regrading Unix commands.
1. Could you provide the commands how to print the content of ".profile" and ".shrc" files on the screen using "more" and "piple" command?
2. How can i use the "head" and "tail" to display lines from 25 through 75...
3. How to search... (1 Reply)
Hello,
What are the options to print the contents of a directory in FIFO fashion?
I have searched the forum for something relative to this question and found no answers.
If there is a way please advise, if it has already been answered, please provide a link to the post.
Alternately if... (1 Reply)
suppose u hava a file
G1354R tGGC-CGC
D1361N cGAC-AAC
I1424T ATC-ACC
R768W gCGG-TGG
Q1382R CAG-CGG
Q178E gCAG-GAG
Y181C TAC-TGC
.........cont.
So the question is
By searching for first word i.e.character say R
output shud be
R768W gCGG-TGG
R182P CGG-CCG
R189W ... (6 Replies)
Hi,
Is there anyway to print contents of any file ( say log files that grow automatically) within some timeframe ( comparing with current time), say
print contents of the added in:
1) last 2 hr
2) last 45 min
3) last 3 hrs 47 min (3 Replies)
Hi All,
I want to write a sh shell script to read input report and search for a specefic pattern in file and print 3 record above and 2 record below the line in which pattern found.
My file contains different- different pattern repeatedly, same pattern set of records should go into one file... (9 Replies)
Hi everyone! I have something like the following records in a file:
ID: 1
Name: A
Age: 23
ID: 2
Name: B
ID: 1
Activity: Climbing
ID: 3
Name: C
ID: 3
Activity: Skating
I want to capture the records where the field Age exists AND the records that have the same ID as the one... (4 Replies)
Hi,
I have a text file with more than 100000 records.
I used the following command
awk '{if ($3<$2) print $1"\t"$3"\t"$2"\t"$4"\t"$5}' input.txt > output.txt
But, this one is printing which satisfies the condition, which are only 1000.
I would like to get all the 100000 records in... (4 Replies)
Hi,
We have a script which takes the backup of some files and writes the output into a log file for each run on a daily basis. Following is the extract from the log file.
Date:20120917
**********************************************************
* BACKUP ACTIVITY STARTED ... (5 Replies)