2 #Desc:Lowercases portion of directory names preceding '..'
3 #Usage: lowerBeforeDoubleDotinDirName.sh
4 #Example case: If working directory contains directory named
5 # '0xDEADBEEF..Human description', it is renamed
6 # '0xdeadbeef..Human description'.
8 for dirSlash
in .
/*; do
9 if [[ -d $dirSlash ]]; then
10 echo "dirSlash:$dirSlash";
11 dir
="$(basename "$dirSlash")";
16 echo "second:$second";
17 firstNoCaps
="$(echo "$first" | tr '[:upper:]' '[:lower:]')";
18 echo "firstNoCaps:$firstNoCaps";
19 newPath
=.
/"$firstNoCaps"..
"$second";
20 echo "newPath=$newPath";
21 echo "===========================";
22 mv "$dirSlash" "$newPath";