Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

None overlap lines

Status
Not open for further replies.

demis001

Programmer
Aug 18, 2008
94
US
Is there any way I can negate the following line. I want to print none-overlap lines between two files. Rather than "in a", I want "not in a"

awk 'NR==FNR{a[$2","$3","$6]=$0;next}$2","$3","$6 in a{print a[$2","$3","$6]"\t"$0}' $*

Thanks
D
 
But if an array item at index "something" doesn't exist, how are you going to print that item? Program doesn't really make sense to me. But that is maybe because it's Monday today?


HTH,

p5wizard
 
I presume he meant to say:

Code:
awk 'NR==FNR{a[$2","$3","$6]=$0;next}!($2","$3","$6 in a)' $*

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top