The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
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 02-23-2007
chengwei chengwei is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 30
Question Parsing comma delimited text file

I need to delete a set of files in certain directories if there're older than a certain number of days. So I have a text file, with each line containing the directory & number of days.

The format is like this:
dirA,5
dirB,7

How do I write script to iteratively parse this text file & delete the files in the directories base on the number of days?

Any help to get started is appreciated!