10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Long time listener first time poster. Hope someone can advise.
I have two files, 1000+ lines in each, two fields in each file.
After performing a sort, what is the best way to find exact matches where field $1 and $2 in file1 are also present in file2 on the same line, then output only those... (6 Replies)
Discussion started by: bstaff
6 Replies
2. Shell Programming and Scripting
Hi Team,
I am facing a problem as under, Suppose I have a file (test.txt) with the below content (all braces and slashes are included in the contents of the file)
Now I want to append few words below matched line, I have written the below sed:
sed '/option/a insert text here' test... (2 Replies)
Discussion started by: ankur328
2 Replies
3. Shell Programming and Scripting
Hi Folks,
I have a large text file with multiple similar patterns on each line like:
blank">PATTERN1 some word PATTERN2
title=">PATTERN1 some word PATTERN2
blank">PATTERN1 another word PATTERN2
title=">PATTERN1 another word PATTERN2
blank">PATTERN1 one more time PATTERN2
title=">PATTERN1... (10 Replies)
Discussion started by: martinsmith
10 Replies
4. Shell Programming and Scripting
Hi,
I am working with two tab-delimited files with multiple columns, formatted as follows:
File 1:
>chrom 1 100 A G 20 …(10 columns)
>chrom 1 104 G C 18 …(10 columns)
>chrom 2 28 T C ... (4 Replies)
Discussion started by: mbp
4 Replies
5. Shell Programming and Scripting
Hi,
Thanks for looking at this issue.
I have many words/lines in a files like below
apple
pine apple
custored apple apple
apple
if i want to replace only/exact apple occurrences with XXX i could use below,
sed 's/\<apple\>/XXX/g' filename
this is working in Linux, but now in my free BSD... (3 Replies)
Discussion started by: ramanaraoeee
3 Replies
6. Shell Programming and Scripting
Hi everyone I've two files..
The contents of file1 are as shown below
4
5
12
13
36
37
45
46
47
The contents of file2 are as shown below
21 hello
13 world (5 Replies)
Discussion started by: abk07
5 Replies
7. UNIX for Dummies Questions & Answers
hi!
i'm trying to get grep to do an exact match for the following pattern but..it's not quite working. I'm not too sure where did I get it wrong. any input is appreciated.
echo "$VAR" | grep -q '^test:]name'
if ; then
printf "test name is not found \n"
fi
on... (4 Replies)
Discussion started by: jazzaddict
4 Replies
8. Linux
Hi
I am having 2 fields and if f1=f2 i wanna print that line
eg
1 2
1 3
1 9
2 2
3 5
9 9
In the abov eg. the highlighted lines shud be printed
2 2
9 9
Thanking u (3 Replies)
Discussion started by: binnybio
3 Replies
9. Shell Programming and Scripting
I have a file (key.dat) that contains two columns:
AA|1234|
BB|567|
CC|8910|
I have another file (extract.dat) that contains some data:
SD|458|John|Smith|
AA|3345|Frank|Williams|
AA|1234|Bill|Garner|
BD|0098|Yu|Lin|
BB|567|Gail|Hansen|
CC|8910|Ken|Nielsen|
I want to compare the... (5 Replies)
Discussion started by: ChicagoBlues
5 Replies
10. Shell Programming and Scripting
Hi All,
I was seaching for script for solaris 5.10 environmet to get a output file from Input file like this.
INPUT FILE----------------
1000KE,MINE,74748
1000KE,YOUR,123998
200KE,MINE,886049
50KE,MINE,474176
50KE,YOUR,379998
100KE,YOUR,999994
50KE,MINE,9601
50KE,YOUR,990393... (3 Replies)
Discussion started by: ashis.tewari
3 Replies