Can somebody help me to write a simple shell script to find words listed in a text file (text file A) from another text file (text file B).

The idea is to check whether a word in the text file A (separated by lines) exists in text file B and delete it from text file A so after finish searching, the remaining lines in text file A is only the entry that doesn't exist in text file B.

Thanks.

If you are running Linux, you could do something like cat TEXTFILE | sed 's|WORD||g' which would find the word and remove it from the file

Note to the Mods:
Didn't notice this thread was old. Sorry.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.