This commit is contained in:
teldra 2021-05-09 19:18:19 +02:00
parent 3994cfae53
commit b10164cc01

View File

@ -8,9 +8,13 @@ index=0
for i in $(find /dev/disk/by-id/ -type l -printf "%P\n"|grep -v "part" |tac); do
name="$(readlink -f /dev/disk/by-id/"${i}")"
if [[ "${i}" =~ "ata-"* ]]; then
echo $i
else
continue
fi
if [[ "${i}" =~ "usb-"* ]]; then
echo $i
else
continue
fi
if [[ "${name}" =~ *"^[0-9]+$"* ]]; then