I'm new to shell scripting and I'm having a tough time figuring out how to script something. Can anyone help?
Here is my setup and what I want to do:
A directory contains a list of projects by year (2000, 2001, etc) and customers (01-001) all of which have the same internal directory setup (1-Current Drawings, 2-Quotes etc...) So like this:
/Server/Projects/2000/001-001/
/Server/Projects/2000/001-002/
etc..
/Server/Projects/2001/005-0045/
/Server/Projects/2001/005-0045/
etc...
Remember EACH of these directories have the same internal folder structure like
1-Current Drawings
2-Quotes
3-Invoices
4-Archived Drawings
etc...
What I want to do is ZIP or TAR the 1-Current Drawings directory (leave the files loose however), move the created archive into the 4-Archived Drawings directory and time stamp the archive name and do this for EACH directory in Projects directory.
So basically some sort of loop to enumerate the Projects in each year and customer, find the 1-Current Drawings, archive it, move it into the appropriate folder of each customer, timestamp the archive, move on to the next customer and year.
In my mind this should be easy but shell scripting is not my forte.
If someone can give a short example that works on a given structure I can probably handle the rest and customize it to my liking. Thanks!