projects
/
gnt-info
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66f9c03
)
correctly format output with errors
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 17 Jan 2018 16:45:36 +0000
(17:45 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 17 Jan 2018 16:45:36 +0000
(17:45 +0100)
gnt-smart-test-vs-hours.sh
patch
|
blob
|
history
diff --git
a/gnt-smart-test-vs-hours.sh
b/gnt-smart-test-vs-hours.sh
index
1ff2094
..
41f2246
100755
(executable)
--- a/
gnt-smart-test-vs-hours.sh
+++ b/
gnt-smart-test-vs-hours.sh
@@
-1,6
+1,6
@@
#!/bin/sh -xe
-
#
sudo ./gnt-smart.sh > /tmp/smart
+
test -e /tmp/smart ||
sudo ./gnt-smart.sh > /tmp/smart
egrep 'Power_On_Hours' /tmp/smart | sed 's/: /:/' > /tmp/smart.2
egrep '# 1' /tmp/smart | sed 's/: /:/' > /tmp/smart.1
-join /tmp/smart.1 /tmp/smart.2 | sed 's/
-
.*Always - / ~ /'
+join /tmp/smart.1 /tmp/smart.2 | sed 's/
[0-9]* Power_On_Hours
.*Always - / ~ /'