echo "How many days old are the branches you want to delete"
echo -n "[Branches age]: "
read userDays
echo "Deleting branchs older than $userDays day old:"
sudo find $FOCUS_HOME -maxdepth 1 -mtime +$userDays -printf '%f\n' -exec rm -rf {} \
echo "Done! All branchs $userDays days old are removed"
I have this simple script shown above that will delete my branches that are kept on my computer after whatever days I put in, that will look at my last time I modified that branch, avoiding me from deleting a branch I might have recently been working on even though its old. I wanted to add an exlusion to this. Basically this will usually return something like:
austins-123456
and then launch an rm -rf on that folder. But I want to have it exclude a certain string:
trunk