ZTS: block_cloning: Use numeric sort for get_same_blocks

Reviewed-by: Kay Pedersen <mail@mkwg.de>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by:  Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #15614
This commit is contained in:
Ameer Hamza 2023-12-07 01:18:43 +05:00 committed by Brian Behlendorf
parent 3c7650491b
commit 5ff43969e7

View File

@ -53,6 +53,6 @@ function get_same_blocks
awk '/ L0 / { print l++ " " $3 " " $7 }' > $zdbout.a
zdb $KEY -vvvvv $3 -O $4 | \
awk '/ L0 / { print l++ " " $3 " " $7 }' > $zdbout.b
echo $(sort $zdbout.a $zdbout.b | uniq -d | cut -f1 -d' ')
echo $(sort -n $zdbout.a $zdbout.b | uniq -d | cut -f1 -d' ')
}