My shell script runs everyday to update certain database. Everytime the script runs it creates a directory, with "current date". These directories contain log and data files:
Now, when I run the update on "20120418", I want to delete "20120415" --- therefore keeping only 3 updates at a time. When it updates on 20120419 - i should only have 20120416 & 20120417 directories.
Is there a way to incorporate this in my script ???