The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-20-2008
sriram003 sriram003 is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 33
Search a list of lines in file into files

I have a file (file1) which is like

host1
host2
host3
host4
the list goes on............


Now I want the above lines in files to be compared with files under
/opt/new/

File names are as below:
Dev
Prod
QA

And suppose host1 from file1 is found under Dev(file under /opt/new) than it should write under a seperate file New-list as host1-DEV

Thanks