Welcome to the Linux Foundation Forum!

for loop

Hi I have a server with an old version of LXD on it which dosen't have the automated delete snapshots on it, so i created the following bash line to bulk delete but would like to add "pv" to it for a progress bar how can I put the following in a loop so pv can show me how many it has deleted of how many that match the pattern?
lxc info wiki | awk '{print$1}' | grep wiki | grep --null '2022' | xargs -n 1 -I{} lxc delete wiki/{}

Categories

Upcoming Training