The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script terminate an account

Discussion in 'General Discussion' started by thaleslqa, Jan 20, 2009.

  1. thaleslqa

    thaleslqa Registered

    Joined:
    Jan 20, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I have a script to eleminar some accounts ...

    for user in `cat` mylist.txt; the / scripts / killacct $ user; done

    Must not be asked to confirmation message, how?

    Somebody help me?
     
  2. DaveUsedToWorkHere

    DaveUsedToWorkHere Well-Known Member

    Joined:
    Dec 28, 2001
    Messages:
    689
    Likes Received:
    1
    Trophy Points:
    18
    You can echo your response to the script when calling it. Like so:

    Code:
    for user in `cat` mylist.txt; echo 'y' | /scripts/killacct $ user; done
    so the command would be
    Code:
    echo 'y' | /scripts/killacct $user
     
Loading...

Share This Page