2月 07, 2017 快速列出全部硬碟的 smart 資訊 for sd in `ls /dev/sd* | egrep '[a-z]$'`; do c=`sudo smartctl -A --all -d sat $sd | grep Vendor -A 50 | grep Self-test -B 50`; echo $sd; echo -e "$c" | grep Vendor -A $((`echo -e "$c" | wc -l` - 5)); done