The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
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 08-22-2008
max_payne1234 max_payne1234 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 7
Clean directories by reading from file

I have a file in following format
directory1=/out/log
purgedays1=4
extn1=log,out,txt
directory2=/clean/log
purgedays2=4
extn2=log,out

now i need need to create a script that reads this file and cleans all the files with the given extn from the given directory.
The catch here is that number of entries in the extn field may vary.
Please help!!