Results 1 to 3 of 3

Thread: Removing numbers from a wordlist.

  1. #1
    Just burned his ISO
    Join Date
    Feb 2010

    Default Removing numbers from a wordlist.

    I would like to have the possibility to remove all entry’s that exists in file a from file b. If file a is numeric only and file b is alphanumeric, remove all numeric only entry’s from b.

  2. #2
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010

    Default Re: Removing numbers from a wordlist.

    I moved your post from the previous thread, since it doesn't seem to fit with the threads theme.
    As for removing numbers from a text file an easy way would be to use sed to do it.
    root@bt~# sed 's/[0-9]*//g' input.txt
    root@bt~# sed 's/[0-9]*//g' input.txt > output.txt
    input.txt being the name of the file

  3. #3
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010

    Default Re: Removing numbers from a wordlist.

    You can use the translate command to remove digits.
    The following example assumes that the file which contains the information needing the numbers removed is "input.txt" and the new file with the numbers removed will be "output.txt":
    cat input.txt|tr -d [:digit:] > output.txt
    tr = translate
    -d = delete
    [:digit:] = the thing you want to delete (this is tr specific syntax)

    tr --help
    man tr
    for more.

    In your original post I'm a little confused why you mentioned files a and b if you're only interested in changing file b.

    You can use
    sort -u
    for unique entries in files. i.e.:
    cat *.txt|sort -u
    Would find all the unique entries in text files for the current directory.

    If file a is always a subset of file b you could sort the two then diff them.

    You could also use grep or egrep and regex to identify numeric only strings and the -v switch for inverse matching.
    Last edited by thorin; 02-23-2010 at 11:54 PM.
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

Similar Threads

  1. Wordlist Menu Tool for Backtrack 4 final
    By purehate in forum BackTrack Howtos
    Replies: 43
    Last Post: 02-15-2011, 02:18 PM
  2. Custom wordlist
    By pablo101 in forum Beginners Forum
    Replies: 5
    Last Post: 03-23-2010, 01:20 AM
  3. WPA Wordlist Problem
    By charlescywong in forum Beginners Forum
    Replies: 2
    Last Post: 02-14-2010, 06:19 PM

Posting Permissions

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