csv=$(qbt torrent list --format csv --filter paused) # Split csv into an array IFS=$'\n' readarray -t array <<< "$csv" # Loop throug torrents for i in ${array[@]:1}; do IFS=',' read -r -a hash <<< "$i" # Resume torrent qbt torrent resume $hash done