Skip to content

Instantly share code, notes, and snippets.

@nirinium
Created September 7, 2020 02:10

Revisions

  1. nirinium created this gist Sep 7, 2020.
    19 changes: 19 additions & 0 deletions wordlist.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    Remove duplicates

    awk '!(count[$0]++)' old.txt > new.txt

    Sort wordlist by length

    awk '{print length, $0}' old.txt | sort -n | cut -d " " -f2- > new.txt

    Sort by alphabetical order

    sort old.txt | uniq > new.txt

    Merge multiple text files into one

    cat file1.txt file2.txt > combined.txt

    Remove all blank lines

    egrep -v "^[[:space:]]*$" old.txt > new.txt