Linux Mint 20.3
lsblk -V
lsblk from util-linux 2.34
Let's find an explanation for the ambiguous behavior of the lsblk utility applied with the -E option. Here is the output without applying the -E option. You can see that there are repeated entries in the SIZE column. These are (loop0 loop2) and (loop6 loop10).
greg@mynt23:~$ lsblk -o NAME,SIZE NAME SIZE loop0 164,8M loop1 4K loop2 164,8M loop3 55,4M loop4 73,9M loop5 66,2M loop6 449M loop7 91,7M loop8 44,4M loop9 40,9M loop10 449M loop11 74,1M loop12 55,7M sda 298,1G ├─sda1 4,9G ├─sda2 104,2G └─sda3 189,1G Now apply the -E option.
greg@mynt23:~$ lsblk -o NAME,SIZE -E SIZE NAME SIZE loop1 4K loop3 55,4M loop4 73,9M loop5 66,2M loop7 91,7M loop8 44,4M loop9 40,9M loop11 74,1M loop12 55,7M sda 298,1G ├─sda1 4,9G ├─sda2 104,2G └─sda3 189,1G The repeated entries from the SIZE column disappeared completely, instead leaving one "original" entry. The entries left should have been loop0 and loop6.
Apply RM or TYPE as a key. You will see that all duplicates are removed, but the "original" entry is left. The manual says that duplicates are removed, not duplicates along with what the duplicates duplicate.
How do we explain it?
lsblk -Vto your questionlsblk -o NAME,SIZE -E SIZEandlsblk -o NAME,SIZE | awk '!h[$NF]++'. Maybe it's a bug