8 lsata - List ATA devices on the system
15 for lnk
in /sys
/block
/sd
*
18 trg
=`readlink -f "$lnk"`
19 path
=`sed -e 's@\(.\+\)/host[0-9]\+.*@\1@' <<<"$trg"`
20 hostnum
=`sed -e 's@.\+/host\([0-9]\+\).*@\1@' <<<"$trg"`
21 echo "$dev $(cat $path/host$hostnum/scsi_host/host$hostnum/unique_id) $path/host$hostnum/scsi_host/host$hostnum"