Results 1 to 10 of 10

Thread: I need to add "A" to begnning of each word in wordlist, help! (plz)

  1. #1
    Just burned his ISO
    Join Date
    Jun 2010
    Posts
    7

    Lightbulb I need to add "A" to begnning of each word in wordlist, help! (plz)

    I have a word list and I want to add an uppercase "A" to the beginning of each line.
    example:

    Before -

    12345678
    adamhick
    bettysue
    carlatoo

    After -

    A12345678
    Aadamhick
    Abettysue
    Acarlatoo

    an option for U/C and L/C would be cool. but only a bonus!

  2. #2
    Super Moderator lupin's Avatar
    Join Date
    Jan 2010
    Posts
    2,943

    Default Re: I need to add "A" to begnning of each word in wordlist, help! (plz)

    OK, basic Linux stuff. Something like this (untested so you may have to tweak)

    Code:
    awk '{print "A" $1}' wordlist.txt > newwordlist.txt
    Change the A to lowercase if you want lowercase. You could also do this with sed, perl, ruby, python, etc.
    Capitalisation is important. It's the difference between "Helping your brother Jack off a horse" and "Helping your brother jack off a horse".

    The Forum Rules, Forum FAQ and the BackTrack Wiki... learn them, love them, live them.

  3. #3
    Senior Member
    Join Date
    Feb 2010
    Posts
    146

    Default Re: I need to add "A" to begnning of each word in wordlist, help! (plz)

    or ask a canadian!
    open source = open minds, human knowledge belongs to the world

  4. #4
    Junior Member
    Join Date
    Mar 2010
    Posts
    44

    Default Re: I need to add "A" to begnning of each word in wordlist, help! (plz)

    Quote Originally Posted by crweedon View Post
    or ask a canadian!
    Eh?




    Edit: this is placed here because @#$%^VBulletin requires 13 characters minimum.

  5. #5
    Super Moderator lupin's Avatar
    Join Date
    Jan 2010
    Posts
    2,943

    Default Re: I need to add "A" to begnning of each word in wordlist, help! (plz)

    Quote Originally Posted by crweedon View Post
    or ask a canadian!
    Don't they add the "Eh" to the end of words?
    Capitalisation is important. It's the difference between "Helping your brother Jack off a horse" and "Helping your brother jack off a horse".

    The Forum Rules, Forum FAQ and the BackTrack Wiki... learn them, love them, live them.

  6. #6
    Just burned his ISO
    Join Date
    Jan 2010
    Posts
    9

    Default Re: I need to add "A" to begnning of each word in wordlist, help! (plz)

    A SED example:

    Code:
    sed 's|^|A|g' ./wordlist.txt > newwordlist.txt

  7. #7
    Just burned his ISO
    Join Date
    Jun 2010
    Posts
    7

    Thumbs up Re: I need to add "A" to begnning of each word in wordlist, help! (plz)

    Not only are you guys hilarious at times (I didn't see that one coming, eh?), but you're all (mostly) really smart. I try to answer the newb questions, being a newb myself it feels good when I can, so it's really nice to get answers to my linux 101 questions. So thanks!


    ps. I always google my problems for hours before deciding to make a post about it.

  8. #8
    Super Moderator lupin's Avatar
    Join Date
    Jan 2010
    Posts
    2,943

    Default Re: I need to add "A" to begnning of each word in wordlist, help! (plz)

    Quote Originally Posted by sprouty View Post
    A SED example:

    Code:
    sed 's|^|A|g' ./wordlist.txt > newwordlist.txt
    Dont forget you can also edit files in place with sed, using the -i option:

    Code:
    sed -i 's|^|A|g' ./wordlist.txt
    Capitalisation is important. It's the difference between "Helping your brother Jack off a horse" and "Helping your brother jack off a horse".

    The Forum Rules, Forum FAQ and the BackTrack Wiki... learn them, love them, live them.

  9. #9
    Just burned his ISO
    Join Date
    Jun 2010
    Posts
    7

    Default Re: I need to add "A" to begnning of each word in wordlist, help! (plz)

    Thanks Lupin and friends, it worked like a charm!


  10. #10
    Just burned his ISO
    Join Date
    Jan 2010
    Posts
    9

    Default Re: I need to add "A" to begnning of each word in wordlist, help! (plz)

    Thank you Lupin. I didn't know that was possible (its going to safe me a lot of hassel )

    Out of interest is there a switch for it in grep?

    Many Thanks,

    Sprouty

Similar Threads

  1. Replies: 4
    Last Post: 02-24-2011, 04:52 PM
  2. Replies: 9
    Last Post: 06-26-2010, 07:03 PM
  3. Wordlist "leetify" - supplimenting CUPP and others
    By Gitsnik in forum OLD Programming
    Replies: 9
    Last Post: 01-15-2010, 06:54 AM
  4. cowpatty & hash error, "Invalid Word Length: -33"
    By ImGeo in forum OLD BackTrack 3 Final
    Replies: 2
    Last Post: 01-26-2009, 03:05 AM
  5. Replies: 17
    Last Post: 10-04-2007, 03:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •