Anand Ramamoorthy wrote:

> This is the first time I'm having issues with "comm" command on an HP-UX Unix 
> box (Model: 9000/800, Release: B11.11)
> 
> I'm trying to compare two files that are "~" delimited.
> 
> File 1
> --------
> 1~10
> 5~30
> 55~40
> 6~20
> 
> 
> File 2
> --------
> 1~20
> 5~35
> 55~40
> 7~27

'comm' requires that the input files be sorted.  These are not sorted,
because "~" comes after "5" in the ascii order.  You can test this for
yourself with something like:

$ echo -e "5~30\n55~40" | sort
55~40
5~30

It works when you use "," because that character comes before the digits
in the ascii order.  Run your input files through 'sort' before passing
them to 'comm'.

Brian


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to