I need to whip up an easy program, but I have no compiler. :wtc:

Discussion in 'OT Technology' started by alex, May 31, 2006.

  1. alex

    alex My neighbor got the gas chamber awhile back for do Moderator

    Joined:
    Oct 11, 2005
    Messages:
    24,383
    Likes Received:
    8
    Location:
    Orange County, NY
    I need to make a program which searches a .txt file for any strings that are e-mail addresses. (not for spamming, I need to delete a zillion bounceback emails from a a newsletter.)

    So, yeah. I figure... String in. Search string for '@.'. If found, output string to file. Loop until eof.

    If anyone out there wants to whip up something real quick for me, I'd love you. :x::wavey:
     
  2. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    google://"perl regular expression email address text file"

    Its already been done for you.
     
  3. alex

    alex My neighbor got the gas chamber awhile back for do Moderator

    Joined:
    Oct 11, 2005
    Messages:
    24,383
    Likes Received:
    8
    Location:
    Orange County, NY
    Specific instructions? I'm only a youngin' programmer. Give me a hand and I'll :bowdown:
     
  4. Glennhuricane

    Glennhuricane New Member

    Joined:
    Apr 2, 2004
    Messages:
    6,070
    Likes Received:
    0
    Location:
    nj
    you cant use ctrl + f?? :dunno:
     
  5. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    Maybe later. I have my own shit to do.
     
  6. samm

    samm Next in Line

    Joined:
    Dec 22, 2000
    Messages:
    2,630
    Likes Received:
    0
    Location:
    San Jose, CA
    you don't need a compiler to run /usr/bin/perl
     
  7. alex

    alex My neighbor got the gas chamber awhile back for do Moderator

    Joined:
    Oct 11, 2005
    Messages:
    24,383
    Likes Received:
    8
    Location:
    Orange County, NY
    Well, the .txt file is 14MB for starters. Secondly, there's probably 3000 address in there. I need them to be neat and pretty and in their own file so i can delete them from the database.
     
  8. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,458
    Likes Received:
    12
    you don't need to write a program to do this.

    dos has basic tools to purge files surprisingly.

    find "@" 14MB.file.txt

    this will list all the lines with the ampersand in it.

    In your case where you need to delete the lines with a zillion bounceback emails from a newsletter, use the /v option.
     
    Last edited: May 31, 2006
  9. GOGZILLA

    GOGZILLA Double-Uranium Member

    Joined:
    Jan 16, 2003
    Messages:
    10,760
    Likes Received:
    3
    Location:
    Plantation, FL
    you can use vim and tons of other tools from linux
     
  10. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    grep '.*\@.*\..*' file.txt >> emailaddresses

    No VIM required.
     
  11. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Why not just provide the link?
     
  12. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    For the record, an ampersand is "&", not "@". "@" is shorthand for "at". "@" actually doesn't have a well-defined name; after poking around for a while, the best I could come up with is "arobase", a french word that has no other meaning -- all the other terms for the symbol did have other meanings, so "arobase" it is.

    The Dutch apparently call it "apeklootje", or "little monkey's testicle". :rofl:

    http://www.herodios.com/atsign.htm

    Interesting note on ampersands from www.dictionary.com:

    "The ampersand is a ligature (combination) of the cursive letters 'e' and 't', invented in 63 BC by Marcus Tirus [Tiro?] as shorthand for the Latin word for 'and', 'et'."

    63BC! And yet, most of the rest of the roman alphabet dates back to the Phoenecians, so "&" is (relatively) new. Still impressive that it's been around that long.
     
    Last edited: Jun 1, 2006
  13. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    Its official ANSI/CCITT name, commercial at, comes from its use in invoices, as in, "7 widgets @ £2 ea. = £14". Other names include: about; acosta; ampersat or asperand (compare ampersand); amphora; ape; apothrope; arobase; atgry; atmark; cabbage; cat; cinnabun or cinnamon bun; commercial symbol; cyclone; each; mercantile symbol; rose; schnable; scroll or scroll-a; snail; strudel; these; vortex; whirlpool; chisignuh; whishi-whishi; yurming; or whorl. Some of these are based on specialized usage, others are visual descriptions, and atgry (plural atgrynge) is a recurring joke proposed on Usenet as the answer to a pair of longstanding linguistic riddles — the singular atgry is a fourth word that ends in gry, along with angry, hungry, and gry; and the plural atgrynge provides a word that rhymes with orange.
     
  14. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,458
    Likes Received:
    12
    wow, seems like the C&P board is full of ego maniacs than needs to sword fight with their e-dicks around.

    "oh yeah, I can use this command"

    "nah uh, I can do it like this, with less forking"

    "well, the history of this command dates back to Jesus"

    "fuck dat, I am taking D+++++ in my spare time on top of my engineering 500 classes"

    this isn't slashdot you losers.
     
  15. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,488
    Likes Received:
    615
    :rofl:
     
  16. alex

    alex My neighbor got the gas chamber awhile back for do Moderator

    Joined:
    Oct 11, 2005
    Messages:
    24,383
    Likes Received:
    8
    Location:
    Orange County, NY
    :bowdown:
     
  17. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    You should be careful about being an asshole in a room full of dicks.

    I was making a correction in someone's terminology, then offering more information on why I made the correction for anyone who may have been interested. In this case, the term that I corrected could have caused the person who started the thread hours of frustration if they took the advice verbatim. Then Jolly demonstrated his ability to give more information than I did, but not until after I did. Then you came in and threw a fit for what can only be classified itself as an egomaniacal reason. Piss off.
     
  18. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    Pussy hurt much? :rofl:
     
  19. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    What can I say...dicks fuck pussies, but dicks fuck assholes too. Whereas assholes like to shit on pussies. :hs:
     
  20. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,488
    Likes Received:
    615
    This kind of crap is NOT appropriate here. Grow up. Thanks.
     
  21. codemartinet

    codemartinet lucky strikes

    Joined:
    May 25, 2006
    Messages:
    95
    Likes Received:
    0
    Location:
    Newark, DE
    a lot of good information presented in the first half of this topic.

    second half is some asshole calling ppl egotistical and then going to shit - thread is pretty much over you guys helped the OP lets all go home happy!
     
  22. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    I was quoting from a movie. Sorry if it was inappropriate.
     
  23. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Ahh...so much optimism...it's a bad idea to hang out here if you want to keep it.
     
  24. codemartinet

    codemartinet lucky strikes

    Joined:
    May 25, 2006
    Messages:
    95
    Likes Received:
    0
    Location:
    Newark, DE
    we shall see :noes:
     
  25. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,488
    Likes Received:
    615
    What movie was it? :confused:

    But posts like that - even movie quotes - tend to cause bad feelings where none need to happen. :hs: Especially when people don't know it's from a movie, like me.
     

Share This Page