3 test -e /tmp/s.last && rm /tmp/s.last
5 for col in "Device Model" "User Capacity" $*
7 # sed and sort is required for join later
8 grep "$col" /dev/shm/smart.sd* | sed \
10 -e "s/[0-9]* $col .* \([0-9][0-9]*\)$/ : \1/" \
13 if [ -e /tmp/s.last ] ; then
14 join -a 1 /tmp/s.last /tmp/s.this > /tmp/s.new
15 mv /tmp/s.new /tmp/s.last
17 mv /tmp/s.this /tmp/s.last
21 cat /tmp/s.last | sed -e 's!/dev/shm/smart.!!' -e 's/: : / : /'