#!/bin/bash for VMID in $(qm list | tail -n+2 | awk '{print $1}'); do echo "Task for $VMID" done