Re: unique comparison 2 fields, (166 Views)
Reply
Valued Contributor
rmueller58
Posts: 851
Registered: ‎02-19-2001
Message 1 of 3 (166 Views)
Accepted Solution

unique comparison 2 fields,

I am wanting to LOOK AT information from two columns:
Where the values in the two columns both are valued I want to ignor.

where the value in Column #1 (FS) exists but not in #2(DB)

I want to echo that value to a flat file for using in STDIN.


FS DB
1001
1002
101
1010
1012
1027 1027
1028 1028
1032 1032
1033
104 104
1040 1040
1045 1045
1048 1048
1049 1049
1054 1054
1062 1062
1063
1065 1065
1066 1066
107 107
1077 1077
1080 1080
1086
1087 1087
1090
1096 1096
11
1100 1100
1106 1106
1108
1109
1112 1112
1113
1115
1116 1116
1124 1124
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 2 of 3 (166 Views)

Re: unique comparison 2 fields,

Hi:

Perhaps:

# awk 'NR>1 && NF==1 {print}' file

Regards!

...JRF...
Valued Contributor
rmueller58
Posts: 851
Registered: ‎02-19-2001
Message 3 of 3 (166 Views)

Re: unique comparison 2 fields,

Thanks James,

It has been a long week.. I couldn't wrap my brain around it.. That did the trick..
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.