Exemplo puro de bash:
#!/usr/bin/env bash
for f in *; do
g="${f::4}" ##Split the first four characters
h="${f:4:1}" ##just the fifth character (starts counting at 0)
i="${f:5}" ## character 6+ (again, counting from 0)
mv -- "$f" "$g${h^^}$i"
##At the end, put the strings back together
##but make $h (character 5) uppercase
done
exit 0
Na realidade, eu provavelmente usaria perl-rename (chamado rename
nos repositórios do Ubuntu; eu sei que em alguns outros ele usa prename
):
rename 's/(.{4})(.)/$1\u$2/' *