[ILUG] comparing files

Liam Bedford lbedford at lbedford.org
Tue Feb 3 10:19:12 GMT 2004


Brian Foster wrote:

> incidentally, previous posters have suggested:
>       cat FILE1 FILE2 | sort | uniq --unique
> winning the “Useless Use of cat(1)‟ Award™, and:
>       sort < FILE1 < FILE2 | uniq --unique
> winning the "I Didn't Test This‟ Award™.
>
>  
>
Cool.. I got an award while I had a cold :)

> what's wrong with?:
>       sort FILE1 FILE2 | uniq --unique
> or the `comm' (almost-)equivalent:
>       sort FILE1 FILE2 | comm -3
> since sort(1) іs a _merge_-and-sort utility?
>
>  
>
Probably nothing.. but I didn't manage to think that far ahead <g>

L.




More information about the ILUG mailing list