X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=smart-query.sh;h=e59836a792423c8d0b24dbf050e138e75673d4c4;hb=4b828e39660e81f575ab7dcd235eb3e526ebe6b6;hp=ac88f0fe0f31b8ca6efa1b8506f871b08b00757e;hpb=a18004cc76afcc1ed3622ce659a5bf15e457ee96;p=gnt-info diff --git a/smart-query.sh b/smart-query.sh index ac88f0f..e59836a 100755 --- a/smart-query.sh +++ b/smart-query.sh @@ -5,7 +5,7 @@ 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 - grep "$col" /dev/shm/smart.sd?.* | sed 's/:/: /' | sed \ + grep "$col" /dev/shm/smart.sd* | sed \ -e "s/$col: */ : /" \ -e "s/[0-9]* $col .* \([0-9][0-9]*\)$/ : \1/" \ | sort > /tmp/s.this @@ -18,4 +18,4 @@ do fi done -cat /tmp/s.last | sed 's!/dev/shm/smart.!!' | column -t -s : +cat /tmp/s.last | sed -e 's!/dev/shm/smart.!!' -e 's/: : / : /'