10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, everyone
I have two files like this:
File 1: A
B
C
D
E
FFile 2:A B 1
A C 2
A K 3
B A 4
D E 3
W X 2
A B 2I want to print all lines (file2) that the first two columns are consist of elements from file1.
So, what I expected is :
A B 1
A B 2 (2 Replies)
Discussion started by: nengcheng
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
If I have a file of something like
@hg19_gold_AL122127.6-131160
GCTTCATCATGCATGGATAGGCTGGCGCCTTTCCTGAGGCCATATGCCGATGGATATG
@hg19_gold_AL122127.6-131159
CTTTAATATTTCCGCCACCATCCTGAGTGAATCCCAGCAAGGACAGTCTTTGGGGATT
@hg19_gold_AL122127.6-131158... (4 Replies)
Discussion started by: jyu429
4 Replies
3. Shell Programming and Scripting
Hi,
i need help to delete all the lines between 2 matched patterns and the first pattern must be deleted too. sample as follows:
inputfile.txt
>kump_1
...........................
...........................
>start_0124
dgfhghgfh
fgfdgfh
fdgfdh
>kump_2
............................. (7 Replies)
Discussion started by: redse171
7 Replies
4. Shell Programming and Scripting
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
Discussion started by: chidori
11 Replies
5. Linux
Hi all,
I have a text data file. My aim here is to find line called *FIELD* AV for every record and print lines after that till *FIELD* RF. But here I want first 3 to four lines for very record as well. FIELD AV is some where in between for very record. SO I am not sure how to retrieve lines in... (2 Replies)
Discussion started by: kaav06
2 Replies
6. Shell Programming and Scripting
hi dudes, I nee you kind assistance, I have to find the matched numbers from 2 text files and output of matched numbers should be in another text file..
I do have text files like this , for example
File 1
787
665*5-p
5454
545-p
445-p
5454*-p
File 2
5455
787
445-p
4356
2445
144
... (3 Replies)
Discussion started by: sureshraj
3 Replies
7. Shell Programming and Scripting
I have an ugly conf file that has the string I'm interested in searching for in the middle of a block of code that's relevant, and I'm trying to find a way to remove that entire block based on the matched line.
I've googled for this problem, and most people helping are only interested in... (9 Replies)
Discussion started by: tamale
9 Replies
8. Shell Programming and Scripting
Hi,
I have the file contents:
Start,End,Req,Resp
12:39,12:40,4,5
The sting to be matched is: Req and Resp.
parsefile("Req,Resp");
Here is the code.
sub parsefile ($)
{
$header=shift; (2 Replies)
Discussion started by: vanitham
2 Replies
9. Shell Programming and Scripting
HI,
I have sentences like this:
@str=("An ribonucleic acid (RNA)-binding protein, started its expression in the daughter cells","Elucidation of the mechanism of retinal degeneration of RNA-binding protein","Rna binding protein is an important protein","In the retinal degenerative process... (1 Reply)
Discussion started by: vanitham
1 Replies
10. Shell Programming and Scripting
Hi
I have a myfile.txt contains the following:
CONTEXT {
AAAAA
}
...
CONTEXT {
BBBBB
}
I want to extract the lines in between CONTEXT { ... }, one by one.
Hence I wrote a command like the following,
sed -n '/^CONTENT/,/^}/ {
w a.txt
}' myfile.txt
The problem with this... (5 Replies)
Discussion started by: hezjing
5 Replies