Simple awk question 
Author Message
 Simple awk question

I am trying to write a awk query without sucsess..
I am looking for "OUT=eth0" AND NOT "DF"
I have tried
awk '/OUT=eth0/ ! /DF/ { print$1,$2,$3,$6,$8,$9,$16,$17 }' log
awk '/OUT=eth0/ !! /DF/ { print$1,$2,$3,$6,$8,$9,$16,$17 }' log
awk '/OUT=eth0/ &! /DF/ { print$1,$2,$3,$6,$8,$9,$16,$17 }' log
but to no avail...
What is the correct syntax?
Thanks for your time!  


Sat, 23 Jul 2005 03:19:10 GMT  
 Simple awk question

Quote:
Doug Jacobs <> writes:
> I am trying to write a awk query without sucsess..
> I am looking for "OUT=eth0" AND NOT "DF"
> I have tried
> awk '/OUT=eth0/ ! /DF/ { print$1,$2,$3,$6,$8,$9,$16,$17 }' log
> awk '/OUT=eth0/ !! /DF/ { print$1,$2,$3,$6,$8,$9,$16,$17 }' log
> awk '/OUT=eth0/ &! /DF/ { print$1,$2,$3,$6,$8,$9,$16,$17 }' log
> but to no avail...
> What is the correct syntax?

awk '/OUT=eth0/ && !/DF/[...]'


Sat, 23 Jul 2005 06:27:26 GMT  
 Simple awk question

Quote:
>I am trying to write a awk query without sucsess..
>I am looking for "OUT=eth0" AND NOT "DF"
>I have tried
>awk '/OUT=eth0/ ! /DF/ { print$1,$2,$3,$6,$8,$9,$16,$17 }' log
>awk '/OUT=eth0/ !! /DF/ { print$1,$2,$3,$6,$8,$9,$16,$17 }' log
>awk '/OUT=eth0/ &! /DF/ { print$1,$2,$3,$6,$8,$9,$16,$17 }' log
>What is the correct syntax?

awk '/a/&&!/b/ {print "xyz"} ' infile

cor



Sat, 23 Jul 2005 10:27:40 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Simple awk question

2. Simple Awk Question

3. Simple AWK question

4. A very simple question on SED or AWK for a GURU, and an enjoyable problem

5. A simple question regarding shell scripts and awk

6. Awk sub command -simple question for html

7. awk:Simpler question: But critical ; please help

8. Simple question concerning awk command

9. Very simple awk for a simple user

10. Question in french (a simple question, very simple)

11. Simple forth question - maybe simple ?

12. Simple Question seeks simple answer

 

 
Powered by phpBB® Forum Software