Hi Robin,
# cat /var/qmail/control/virtualdomains /var/qmail/control/morevirtualdomains |cut -d : -f1 Best Regards Saturday, August 26, 2006, 8:59:38 AM, you wrote: > Hi, > Just wondering what the canonical way is to get a list of all domains on > a server? > I've come up with this: > vdominfo | \ > perl -ne 'if ((/^domain: /) && !(/alias of/)) \ > { s/^domain: //; print; }' > For clarity, the perl code is equivalent to: > while (<>) { > if ( (/^domain: /) && !(/alias of/)) { > s/^domain: //; > print; > } > } > The algorithm is: > For every line: > if it starts with "domain: " and does not contain the text "alias of" > delete "domain: " from the start of the line > print the line > Any other ideas? > R. -- Ismail YENIGUL Proje Yƶneticisi / Project Manager [EMAIL PROTECTED] http://www.endersys.com