This commit is contained in:
Sandino Araico Sanchez 2016-12-12 18:41:53 -06:00
parent dc908df1a4
commit 37a733cb14

View file

@ -5,14 +5,14 @@ if [ -z $OUTPUT_DIR ] ; then
fi
DISKS=`smartctl --scan | cut -d ' ' -f 1`
#DISKS=sda
#DISKS=/dev/sdb
for DISK in ${DISKS}
do
echo -n "$DISK:" >> $OUTPUT_DIR/disk.lst
smartctl -i $DISK \
| grep -i 'serial number' \
| cut -d ':' -f 2 \
| sed 's/\s\+//' \
>> $OUTPUT_DIR/disk.lst
echo -n "$DISK:" >> $OUTPUT_DIR/disk.lst
smartctl -i $DISK \
| grep -i 'serial number' \
| cut -d ':' -f 2 \
| sed 's/\s\+//' \
>> $OUTPUT_DIR/disk.lst
done