Hello Guys,
I'm hoping this is the right room, i'm using Shell scripts so i hope i'm on the right track. I've looked at the DIFF and CMP commands but i'm struggling to put them to good use in this occasion.
I need to take two files which are a list of network address's and compare them, and then output a list of address that are unique to file 1.
So, let me try and draw you a clearer picture, i have two .txt files.
File 1
File 2
I would then need this comparison command to output 00:09:2D:31:69:4C-2 as that is the address unique to file 1.
The address's in both files are generated dynamicly so could be in any order and there could be any number of address's, the only thing i can gaurentee is that each address will only appear once in each file.
I've used the COMM command to try and do this but i seems to get itself confused if the order changes in each file, as if its doing a line by line comparison.
Any ideas? I'm looking to put this in a bash shell script,
Thanks in advance for any help you guys can pass my way.
Rob
I'm hoping this is the right room, i'm using Shell scripts so i hope i'm on the right track. I've looked at the DIFF and CMP commands but i'm struggling to put them to good use in this occasion.
I need to take two files which are a list of network address's and compare them, and then output a list of address that are unique to file 1.
So, let me try and draw you a clearer picture, i have two .txt files.
File 1
Code:
00:09:2D:31:69:4C-2
00:0E:6D:04:6D:06-9
00:0E:6D:E4:62:03-9
File 2
Code:
00:0E:6D:04:6D:06-9
00:0E:6D:E4:62:03-9
I would then need this comparison command to output 00:09:2D:31:69:4C-2 as that is the address unique to file 1.
The address's in both files are generated dynamicly so could be in any order and there could be any number of address's, the only thing i can gaurentee is that each address will only appear once in each file.
I've used the COMM command to try and do this but i seems to get itself confused if the order changes in each file, as if its doing a line by line comparison.
Any ideas? I'm looking to put this in a bash shell script,
Thanks in advance for any help you guys can pass my way.
Rob