Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

grab .contactemail adresses

Discussion in 'E-mail Discussion' started by cyon, Jun 11, 2004.

  1. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    166
    hi guys,

    I'd like to read out all the e-mailadresses in .contactemail to import this adresses in my own newslettersystem.

    Code:
    cat /home/*/.contactemail > emails.txt
    doesnt work, because I got emai@domain1.comemail@domain2.com...

    Is there a way to insert a linebreak after each adress?

    Or is there a better way to grab all this adresses?

    Thank you for your help and ideas.
     
  2. coastinc

    coastinc Well-Known Member

    Joined:
    Mar 13, 2002
    Messages:
    158
    Likes Received:
    0
    Trophy Points:
    316
    If you'd like, I can make you a short perl script that would do that.... Just drop me an e-mail and I'll be more than glad to do so.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. registerpol

    registerpol Member

    Joined:
    Feb 25, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Montreal
    bump
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #3 registerpol, Jun 11, 2004
    Last edited: Jun 11, 2004
  4. darksoul

    darksoul Active Member

    Joined:
    Feb 20, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    156
    for i in `awk -F: '/home/ {print $1};' /etc/passwd`
    do
    email=`cat /home/$i/.contactemail`
    if test -n "$email"; then
    echo $email >> list.txt
    fi
    done
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #4 darksoul, Jun 13, 2004
    Last edited: Jun 13, 2004
  5. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    166
    @darksoul: thank you very very much, your scripts works great!

    @coastnic: thank you for your offer, but darksoul helped me already.
     
Loading...
Similar Threads - grab contactemail adresses
  1. gregc
    Replies:
    2
    Views:
    953

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice