Searching a string stored in other file

I need to design a script which can do the following:

I have two files abc.txt and constant.hmtl
abc.txt contains some 5 string that I need to see if they exist in contants.html.

Constants.hmtl is a very large file around 800 lines.
I want to search all the strings present in file abc.txt, and see if they are present in constant.html

Any help will be appreciated?

Do you need to check for any of the lines, or all of them?

Need to search all of them.

What is not clear (and so how to design...)
abc.txt contains 5 strings, OK but only? and how? 5 lines?

Searching in second file is just a question of reading line per line until EOF...
But how do you want it to treat the finding of the strings?
One option is to enumerate the presence of the found strings if any...

I think we can do it with fgrep:

pandu#fgrep -f abc.txt constant.html

But works only if you want to search the content in constant.html

Hope it works!

Modified my Q hope that clears it more

---------- Post updated at 12:23 PM ---------- Previous update was at 12:14 PM ----------

What is pandu?? I have never seen this before?

Would it not be easier to give us a abc.txt sample?

Depending what you want the above proposition in post#5 might well do the job...

Should read:

fgrep -f abc.txt constant.html
 
What is pandu?? I have never seen this before?

that's my PS2 of my Solaris box.. anyway did u get the required output?

I want to check all the files. I am writing a big script file which uses this same arrangment for 100 different folders.

With the search results i want to write them to a xml file with the path of the file.

cant use pandu.

---------- Post updated at 04:36 PM ---------- Previous update was at 04:34 PM ----------

abc.txt

has-SAme_COlors
Has_different_colrs
CERMIC_Endings_Eligible