Sorry about this "topic ressurection", but I faced the same demand and a cleaner(and way faster) solution would be:



#!/bin/bash

echo "account,mailquota,quotaused" > /tmp/accounts_status.csv...