diff --git a/proxmox/proxmox-list-containers.sh b/proxmox/proxmox-list-containers.sh new file mode 100644 index 0000000..23b55af --- /dev/null +++ b/proxmox/proxmox-list-containers.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# 2024.Apr kneutron + +declare -a tmpa +tmpa=$(pct list) +# if we dont quote tha var/array, only get 1 line of output + +echo "$tmpa" |egrep 'Status|running' +#VMID Status Lock Name +#105 running gotify +#118 running proxmox-fileserver-ctr + +echo '=====' +echo "$tmpa" |egrep 'Status|stopped' +#VMID Status Lock Name +#110 stopped suseleap-ctr-p +#113 stopped debian-ctr +#114 stopped debianctr-xorgtest +#122 stopped test-phone-tether +#124 stopped debian-qdevice-dellap + +exit; + +# echo "$tmpa" +VMID Status Lock Name +105 running gotify +110 stopped suseleap-ctr-p +113 stopped debian-ctr +114 stopped debianctr-xorgtest +118 running proxmox-fileserver-ctr +122 stopped test-phone-tether +124 stopped debian-qdevice-dellap