LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-19-2004, 01:52 AM   #1
ostech
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
Need help in developing a script


I could do with some scripting help. For experts it should be a breeze..


I would like to write a script that automatically sets up disk quotas for user accounts across all domains on my virtual mail server.

The domains are domain1.com domain2.com domain3.com ...

the user accounts under each domain are user1 user 2 user3.

Right now i have to manually go to each domain under
/home/virtual/domains.
Here all the user folders are listed.

Then i have to type
maildirmake -q 10000000S USERNAME

repeat this for each username.

The repeat this for each domain.

how can i write a script do do this?

apologize is this is the wrong place to ask this kind and level of question.

thank you
ostech
 
Old 04-19-2004, 02:49 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Code:
#!/bin/bash
for dom in /home/virtual/*; do (
  cd $dom
  for u in *; do (
  cd $u
  maildirmake -q 10000000S $u
  ) done
)done
 
Old 04-22-2004, 09:24 AM   #3
ostech
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Thumbs up thank you

thank you. appreciate the help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting developing on Linux jpkeisala Programming 3 06-27-2005 12:41 AM
developing device drivers djgerbavore Linux - Hardware 1 07-30-2004 01:49 PM
I'm developing an Advanced Backup Script. Any interest? system Linux - Software 0 07-06-2003 01:59 PM
software developing tools markus1982 Programming 2 03-28-2003 05:08 PM
What happens when Linus stops developing? bkeating Linux - General 10 10-10-2002 07:01 PM


All times are GMT -5. The time now is 05:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration