[BlueOnyx:06699] fwiw

David Booth md at goulburn.net.au
Wed Mar 16 01:17:39 -05 2011


I wanted to find all the users who have a .forward, and what's in it.

So I made lookforward.sh

#! /bin/bash
ls /home/sites > sitelist.txt
cat sitelist.txt | while read line;
do
         site=$line
         ls /home/sites/$site/users > tmp
         cat tmp | while read line;
         do
                 if [ -f /home/sites/$site/users/$line/.forward ]
                 then
                         echo ___________________________________________;
                         echo $site;
                         echo $line;
                         cat /home/sites/$site/users/$line/.forward
                         echo ___________________________________________;
                         fi
                 done
done

I still have to munge it to get what I really need but it beats doing it  
one by one.

Enjoy.
-- 
David Booth

Goulburn Internet



More information about the Blueonyx mailing list