projects
/
gnt-info
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
relax smart dump names for real jbod disks
[gnt-info]
/
smart-query.sh
diff --git
a/smart-query.sh
b/smart-query.sh
index
3c1a9c4
..
5ba086a
100755
(executable)
--- a/
smart-query.sh
+++ b/
smart-query.sh
@@
-5,9
+5,9
@@
test -e /tmp/s.last && rm /tmp/s.last
for col in "Device Model" "User Capacity" $*
do
# sed and sort is required for join later
for col in "Device Model" "User Capacity" $*
do
# sed and sort is required for join later
- grep "$col" /dev/shm/smart.sd
a.
* | sed 's/:/: /' | sed \
+ grep "$col" /dev/shm/smart.sd* | sed 's/:/: /' | sed \
-e "s/$col: */ : /" \
-e "s/$col: */ : /" \
- -e "s/[0-9]* $col .* \([0-9][0-9]*\)$/\1/" \
+ -e "s/[0-9]* $col .* \([0-9][0-9]*\)$/
:
\1/" \
| sort > /tmp/s.this
if [ -e /tmp/s.last ] ; then
| sort > /tmp/s.this
if [ -e /tmp/s.last ] ; then
@@
-18,4
+18,4
@@
do
fi
done
fi
done
-cat /tmp/s.last | column -t -s :
+cat /tmp/s.last |
sed 's!/dev/shm/smart.!!' |
column -t -s :