keep headings
[gnt-info] / gnt-vg-usage.sh
index 4b5f972..e19168e 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh -xe
 
-gnt-cluster command -M vgs --units g --noheadings | grep -v '^return' | awk '{ print $0 " " $7 - $8 }' | tee /dev/shm/gnt-vgs-usage
+gnt-cluster command -M vgs --units g | grep -v '^return' | awk '{ if ( $7 - $8 != 0 ) print $0 " " $7 - $8 ; else print $0 ; }' | tee /dev/shm/gnt-vgs-usage