I have the following awk command, reading data from my local server(sun5) and remote server(sun8).Each doing the same command and displaying the differences into a diffs.txt file.
problem is that its not picking up all differences and displaying them.
here is an example:
sun5-printers.txt file
sun8-printers.txt file
diffs.txt file
NOTICE that its not picking up the 5001a55. Any advice on how to fix the awk command?????
Code:
awk 'BEGIN {while ( getline < "sun5-printers.txt") {arr[$0]++ } } { if (!($0 in a
rr ) ) { print } }' sun8-printers.txt > diffs.txt
problem is that its not picking up all differences and displaying them.
here is an example:
sun5-printers.txt file
Code:
device for 5001a10: lpd://172.25.5.124:515
device for 5001a11: lpd://172.25.5.155:515
device for 5001a55: lpd://172.25.6.31:515
device for 5001a77: lpd://172.25.12.34:515
device for 5001a88: lpd://172.25.6.86:515
device for 5001a99: lpd://172.25.6.31:515
Code:
device for 5001a11: lpd://172.25.5.155:515
device for 5001a44: lpd://172.25.6.31:515
device for 5001a77: lpd://172.25.12.34:515
device for 5001a88: lpd://172.25.6.86:515
device for 5001a99: lpd://172.25.6.31:515
Code:
more diffs.txt
device for 0601dn1: lpd://172.25.53.32:515
device for 0601jc1: lpd://172.25.53.33:515
device for 0601la1: lpd://172.25.53.34:515
device for 0601ps1: lpd://172.25.53.36:515
device for 0601ps2: lpd://172.25.53.30:515
device for 0606ge1: lpd://172.28.9.29:515
device for 5001a44: lpd://172.25.6.31:515
NOTICE that its not picking up the 5001a55. Any advice on how to fix the awk command?????