10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Der colleagues,
4 days I am trying to solve my issue and no success..
Maybe you can give me a clue how to achieve what I need..
So I have two files.
file1 example:
1_column1.1 1_column2.1 aaa 1_column4.1
1_column1.2 1_column2.2 ttt 1_column4.2
1_column1.3 1_column2.3 ... (10 Replies)
Discussion started by: nypreH
10 Replies
2. Shell Programming and Scripting
Hi,
I could only find examples to print line before/after a match, but I'd need to print line after two separate lines matching.
E.g.: From the below log entry, I would need to print out the 1234. This is from a huge log file, that has a lot of entries with "CLIENT" and "No" entries (+ other... (3 Replies)
Discussion started by: Juha
3 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I have a problem that I'm struggling to resolve. I have two files that look like this:
File 1
654654654 3
987987987 2
321321321 1
File 2
14NS0064 654654654
14NS0054 654654654
14NS0032 654654654
14NS0090 987987987
14NS0093 987987987
14NS0056 321321321
As you may notice,... (2 Replies)
Discussion started by: winkleman
2 Replies
4. UNIX for Dummies Questions & Answers
I would like to add two additional conditions to the actual code I have: print '+' if in File2 field 5 is greater than 35 and also field 7 is grater than 90.
while read -r line
do
grep -q "$line" File2.txt && echo "$line +" || echo "$line -"
done < File1.txt '
Input file 1:
... (5 Replies)
Discussion started by: bernardo.bello
5 Replies
5. Shell Programming and Scripting
Hi all,
I have two files, chap.txt and complex.txt.
chap.txt looks like this:
a
d
l
m
r
k
complex.txt looks like this:
a c d e l m n j
a d l p q r
c p r m
......... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies
6. UNIX for Advanced & Expert Users
Hi Folks!
im printing all lines where the characters in position 270-271 match 33|H1|HA|KA|26 so i came up with this
#!/bin/bash
array=(33 H1 HA KA 26 )
for i in "${array}"
do
#echo $i
awk '{ if (substr($0,270,2)~'/$i/') print; }' $1 >> $1.temp
done
It works fine . but... (2 Replies)
Discussion started by: phpsnook
2 Replies
7. Shell Programming and Scripting
Hi all,
I got several lines line this
a b c d e 1 e
a 1 c d e 3 f
a b c 1 e 8 h
a b c d e 1 w
a 1 c d e 2 w
a b c d e 1 t
a b c d e 7 4
How can I print the line if 1 is the field one before the last field?
Basicly this 2 field ?
a b c d e 1 e
a b c d e 1 t
The file I got is... (7 Replies)
Discussion started by: stinkefisch
7 Replies
8. Shell Programming and Scripting
Hello Gurus....
Can any one please let me know how to print entire xml if the vlaue in the xml matches to a variable given. In PERL.
example:
<rpad:systemId>abc</hcdd:systemId>
<rpad:hcdd>1172</hcdd:hcdid>
</get:Request></soapenv:Body></soapenv:Envelope>
if value macthes 1172 I... (3 Replies)
Discussion started by: thankful123
3 Replies
9. Shell Programming and Scripting
Hi All,
I would like my code to be able to print out the whole line if 1st field has a dot in the number. Sample input and expected output given below.
My AWK code is below but it can;t work, can any expert help me ?
Thanks in advance.
{if ($1 ~ /*\.*/) { print $0 }}
Input:
... (2 Replies)
Discussion started by: Raynon
2 Replies
10. Shell Programming and Scripting
Hi
i need a help for making a script whch can print next line if it matches a particular word
like file1 have
ename Mohan
eid 2008
ename Shyam
eid 345
if scipt got Mohan it will print next line (eid 2008)
pls help me .......:) (2 Replies)
Discussion started by: anish19
2 Replies