]>
zdv2.bktei.com Git - BK-2020-03.git/blob - sysutils/bklowerBeforeDoubleDotinDirName.sh
   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";