correctly format output with errors
[gnt-info] / gnt-smart-test-vs-hours.sh
1 #!/bin/sh -xe
2
3 test -e /tmp/smart || sudo ./gnt-smart.sh > /tmp/smart
4 egrep 'Power_On_Hours' /tmp/smart | sed 's/: /:/' > /tmp/smart.2
5 egrep '# 1' /tmp/smart | sed 's/: /:/' > /tmp/smart.1
6 join /tmp/smart.1 /tmp/smart.2 | sed 's/ [0-9]* Power_On_Hours.*Always - / ~ /'