LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Need help in developing a script (https://www.linuxquestions.org/questions/linux-general-1/need-help-in-developing-a-script-171927/)

ostech 04-19-2004 01:52 AM

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

ToniT 04-19-2004 02:49 AM

Code:

#!/bin/bash
for dom in /home/virtual/*; do (
  cd $dom
  for u in *; do (
  cd $u
  maildirmake -q 10000000S $u
  ) done
)done


ostech 04-22-2004 09:24 AM

thank you
 
thank you. appreciate the help!


All times are GMT -5. The time now is 11:40 AM.