#!/bin/sh
header="Name:GPU:Memory
"
table="$(nvidia-smi --query-gpu name,utilization.gpu,utilization.memory --format=csv \
| sed 's/ %/%/g' \
| awk 'BEGIN{FS=", "; OFS=":"} {if(NR>1) print $1,$2,$3}')"
cat <<<"${header}${table}" | column --separator=":" --table