#!/bin/sh ls /var/amavis/quarantine/spam > /tmp/spamlist for file in `cat /tmp/spamlist`; do mv -v $file /home/bernard/q-spam done