#!/bin/bash set -eu set -o pipefail devices="$@" while true do #smartctl -a "$device" | cat -s echo $(date) $(for device in $devices; do smartctl -a "$device" | egrep 'Temperature_Celsius' | awk ' { print $10 }'; done) sleep 600 done