shell script fun! how to perform an action on each subdirectory from a given path??
- by pocketfullofcheese
I am writing a shell script (which I suck at) and I need some help. Its a script that is moving things from git to CVS (not important). The thing is, i a file path:
controllers/listbuilder/setup/SubmissionRolesListbuilderHandler.inc.php
and I need to be able to do:
cvs add controllers;
cvs add controllers/listbuilder;
cvs add controllers/listbuilder/setup;
cvs add controllers/listbuilder/setup/SubmissionRolesListbuilderHandler.inc.php
Can someone help me out? The best I've come up with so far is to recursively add ALL files in my working tree, but that seems overly inefficient.