JB,

You could definitely do this with Perl, but I suggest a shell script instead.

If you use bash, and you probably do, the following would work provided you have each 
domain on it's own line in a file named domains.txt:

for dom in `cat domains.txt` ; do
    /var/qmail/vpopmail/bin/vdeldomain ${dom}
done

That's it!

--------------------------
David Olbersen 
iGuard Engineer
11415 West Bernardo Court 
San Diego, CA 92127 
1-858-676-2277 x2152


> -----Original Message-----
> From: John B [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 21, 2003 9:57 AM
> To: [EMAIL PROTECTED]
> Subject: Run System Command against every line in a specific file
> 
> 
> Hello All,
> 
> Any help on this topic would be greatly appreciated. 
> Here's the situation.  I have a mailserver that I'm
> cleaning up running qmail/vpopmail.  What I'm doing is
> deleting all dead domains on that mailserver.  The
> system command for this would be:
> 
> /var/qmail/vpopmail/bin/vdeldomain hostname.com
> 
> Easy enough. The problem is, I have a list of over 500
> domains that need to be removed.  What I am trying to
> do is put those 500 domains in a text file and run the
> system command based on the contents of that text
> file.  Essentially running the system command for
> every domain in that file.  Anyone have any ideas on
> how I could accomplish this?
> 
> Thanks In Advance,
> 
> JB 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to