@OP: If your sample is representative then the suggested solutions will do fine. However, if your actual data also has varying elements, e.g. timestamps etc., and you want to ignore those fields when checking for *equal* lines then you might have to consider a slightly different solution. What I mean is, consider the following data:
Code:
$ cat file1
hostname1 [22:22]
hostname2 [23:23]
hostname3 [00:00]
$ cat file2
hostname1 [22:00]
hostname3 [00:30]
Now, if you do not care about the timestamps and only hostname2 should be printed then, e.g., you could do for the above data:
Code:
$ cat file1 file2 |sort|rev| uniq -f 1 -u|rev
hostname2 [23:23]
If you have a variable number of columns then you'd probably have to switch to an 'awk' solution. Let us know your exact requirement.