
cat word_list.txt | awk '{for(i=1;i<NF;i++){print $i}}' | sort > sorted_word_list.txt

cat sorted_word_list.txt | awk 'BEGIN{printf("BEGIN{\n"); }{{printf("z[%d] = \"%s\"\n",++s,$1)}}END{printf("length_z = %d;\n",s+1); printf("start=1;}\n")}'  > word_array.txt

cat word_array.txt | awk '{print $0}END{printf("{s=0; for(i=start;i<length_z;i++)if($1==z[i]) {s++; start = i; break;} if(s==0) print $1}\n")}' > remove_words2.awk
