Grep order from file
===

I have 2 files.  
In first file i have teplates that i want to found in second filed.  
How i must use grep for save order like it in first file in output.  
example:  

**file1:**  
a  
dc  
as  

**file2:**  
aadfadf  
asdva  
vaad  
a  
dccsads  
asas

I use this command:  
`grep -f file1 file2 >> file3`
