10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to extract some patterns from a line. The input file is space delimited and i could not use column to get value after "IN" or "OUT" patterns as there could be multiple white spaces before the next digits that i need to print in the output file . I need to print 3 patterns in a... (3 Replies)
Discussion started by: redse171
3 Replies
2. Shell Programming and Scripting
Hello Gurus,
I have a file this
Dir Path 1
Connection pool="somename"; "DataSource Name"="DS name"; Password="pwd"; User Id="uid";some other fields
Dir Path2
Password="pwd2"; User id="uid2"; Connection pool="somename2"; "datasource name"="DS name2";some other fields.
Under each dir... (14 Replies)
Discussion started by: sirababu
14 Replies
3. Shell Programming and Scripting
Hi Gurus,
I have a requirement where I need to display all lines between 2 patterns except the line where the first pattern in it. I tried the following command using awk but it is printing all lines except the lines where the 2 patterns exist.
awk '/TRANSF_/{ P=1; next } /Busy/ {exit} P'... (9 Replies)
Discussion started by: svajhala
9 Replies
4. Shell Programming and Scripting
Hi,
I want to print only lines (green-italic lines) in between first and last strings in column 9.
there are different number of lines between each strings.
10 AUGUSTUS exon 4558 4669 . - . 10.g1
10 AUGUSTUS exon 8771 8889 . ... (6 Replies)
Discussion started by: jamo
6 Replies
5. Shell Programming and Scripting
Coins.txt:
gold 1 1986 USA American Eagle
gold 1 1908 Austria-Hungary Franz Josef 100 Korona
silver 10 1981 USA ingot
gold 1 1984 Switzerland ingot
gold 1 1979 RSA Krugerrand
gold 0.5 1981 RSA Krugerrand
gold 0.1 1986 PRC Panda
silver 1 1986 USA Liberty dollar
gold 0.25 1986 USA Liberty... (2 Replies)
Discussion started by: Ramesh M
2 Replies
6. Shell Programming and Scripting
I need to print out sections (varying numbers of lines) of a file between patterns. That alone is easy enough: sed -n '/START/,/STOP/' I also need the 3 lines BEFORE the start pattern. That alone is easy enough: grep -B3 START But I can't seem to combine the two so that I get everything between the... (2 Replies)
Discussion started by: Finja
2 Replies
7. Shell Programming and Scripting
Hi,
From my input files, I want to print $1, $2 and only certain pattern in $4 (EC). I use this code but it print all the words in $4
awk -F"\t" '$4 {print $1,$2,$4}I just want EC follows by the numbers in $4
The input file as follows:-
Entry Entry name Status Names
Q01284 ... (7 Replies)
Discussion started by: redse171
7 Replies
8. Shell Programming and Scripting
I would like to print result of multiple search pattern invoked from an one liner. The code looks like this but won't work
gawk -F '{{if ($0 ~ /pattern1/) pat1=$1 && if ($0 ~ /pattern2/) pat2=$2} ; print pat1, pat2}'
Can anybody help getting the right code? (10 Replies)
Discussion started by: sdf
10 Replies
9. Shell Programming and Scripting
I have been unable to find this anywhere; I have a multiline variable, and I want to print the text between two patterns in that variable. So the variable is
My
real
name
is
not
DeadmanAnd I need the output to be this, by printing between "real" and "not"
name
is
or including the two... (10 Replies)
Discussion started by: killer54291
10 Replies
10. Shell Programming and Scripting
hello,
i have an input file of about 50,00,000 lines. few of its lines are as follows:
<CR:0023498789,TPO-14987084;BO=IC&SUB=ALLP
<CF:0023498789,CB=YES;BIL&NC=NO
<CF:0023498789,CW=NO;NS=NO
<GC:0023498789,CG=YES;TPO&NC=YES
<CR:0024659841,TPO-14484621;BO=NO&BA=OC&SUB=ALLH... (1 Reply)
Discussion started by: rochitsharma
1 Replies