Ooh, it seems more complicated. Your code does not work on a machine with one SATA disk: $ udevadm info -r --query=symlink /dev/sda /dev/disk/by-id/wwn-0x5001517803d00e48 /dev/disk/by-id/ata-INTEL_SSDSC2CW120A3_CVCV249103KG120BGN /dev/disk/by-path/pci-0000:00:1f.2-ata-1
$ udevadm info -r --query=symlink /dev/sda | sed -n 's;.*\(/dev/disk/by-id/\S\+\).*;\1;p' /dev/disk/by-id/wwn-0x5001517803d00e48 Before changing the code, I like to know if there are more unknows cases we should keep an eye on. -- viele Grüße Thomas