rename_to_lowercase.ksh 279 B

123456789
  1. typeset -l f
  2. for F in *[[:upper:]]*; do
  3. # [ -f "$f" ] || continue # uncomment to skip non-regular files if needed
  4. # [ -L "$f" ] && continue # uncomment to also skip symlinks even
  5. # if they resolve to regular files
  6. f=$F
  7. mv -i -- "$F" "$f"
  8. done