Help regarding grep command

view story

http://www.unix.com – Hi , I have two files File1 and File2.In First file i have table names abc def cfg In second file i have the sql commands for e.g replace view def.test1 for access select * from abc.test1; I have to find the common words from File1 and File2 and printing it in File3 the grep command i am using is grep -o -f File1 File2|sort|uniq > File3 The problem i am facing is , if i run the above grep command i am getting only "def" in File 3. Could you please say, wht command i have to use if i have to get all the common words from File1 and File2. (HowTos)