Oops, I hit the wrong button ...
cat > /tmp/x <<!
b
a
!
ln /tmp/x /tmp/y
sort -c /tmp/x
join --check-order /tmp/x /tmp/y
# Note: The two files do not have to be the same.
Output is
sort: /tmp/x:2: disorder: a
join: file 1 is not in sorted order
Thanks for your consideration.
--- the forwarded message follows ---
--- Begin Message ---
When there is disorder, could you please provide the line
number like the command and option
sort -c
does? Note: join seems to report disorder in file 2 only
if there is no disorder in file 1.
You try the following code
Thanks
--- End Message ---