You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cleanEmptyFolders() {
local _location="$1"local _hidden="${2}"local dir # if this is missed, all variables are shared across activation records (stack frames)fordirin$(childDirs "$_location");doif [[ !$_hidden&&$(basename "$dir")== .* ]];thencontinue# Ignoring hidden foldersfiecho"Dir: $dir"echo"Exploring: $dir"
cleanEmptyFolders "$dir""$_hidden"if [[ !$(ls -A "$dir") ]];thenecho"After check dir: $dir"
rmdir "$dir"# echo "Empty folder '$dir' deleted."fidone
}
The text was updated successfully, but these errors were encountered:
I am thinking of switching to a sane lang for scripting - like Python (classic scripting) or JS (I'm fluent). But bash quirks would remain, even if not very relevant.
The text was updated successfully, but these errors were encountered: