#!/bin/bash
>~/Documents/xxxttt
rm -f ~/Documents/mountPoint
rm -f ~/Documents/VolumeUuid
shopt -s extglob

while IFS=: read key value; do
key="${key##+( )}"
value="${value##+( )}"
case "$key" in
"Product ID")
p="${value% *}"
;;
"Vendor ID")
v="${value%% *}"
;;
"Manufacturer")
m="${value}"
;;
"Location ID")
l="${value}"
#printf "%s:%s %s (%s)\n" "$v" "$p" "$l" "$m"
if [ "$v" = "0x0dd8" ]; then
echo netac>> ~/Documents/xxxttt
else
echo ""
fi
if [ "$v" = "0x0DD8" ]; then
echo netac>> ~/Documents/xxxttt
else
echo ""
fi
if [ "$m" = "Netac SSD" ]; then
echo netac>> ~/Documents/xxxttt
else
echo ""
fi

;;
esac
done < <( system_profiler SPUSBDataType )
