diff --git a/plugins/available/base.plugin.bash b/plugins/available/base.plugin.bash index 98d1fb46..da64af4f 100644 --- a/plugins/available/base.plugin.bash +++ b/plugins/available/base.plugin.bash @@ -183,3 +183,18 @@ buf () local filetime=$(date +%Y%m%d_%H%M%S) cp ${filename} ${filename}_${filetime} } + +for_all_dirs () +{ + about 'loops through all subdirectories of the current directory and executes the specified command in each of them' + param 'command' + group 'base' + example '$ for_all_dirs svn up' + for dir in */ + do + echo "Processing $dir" + cd "$dir" + $* + cd .. + done +}