No need to use both grep and awk here - just grep will do.

This commit is contained in:
Josh Smith 2015-10-05 12:41:49 -04:00
parent 0aea938dea
commit b59c007f85

View File

@ -81,8 +81,7 @@ fi
cd "$TMP_DIR"
IMG_SIZE=$(qemu-img info "$TMP_IMG" | grep 'virtual size' | awk '{print int($3);}' | tr -d 'G')
echo "IMAGE SIZE ====> ${IMG_SIZE}"
IMG_SIZE=$(qemu-img info "$TMP_IMG" | awk '/virtual size/{print int($3);}' | tr -d 'G')
cat > metadata.json <<EOF
{