The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



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

Join Date: Mar 2007
Posts: 22
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
Reply With Quote
Forum Sponsor