Script para converter nomes de arquivos de MAIÚSCULAS para minúsculas.
#!/bin/bash file="$1" if [ $# -eq 0 ] then echo "$(basename $0)" exit 1 fi if [ ! $file ] then echo "$file não é um arquivo" exit 2 fi lowercase=$(echo $file | tr '[A-Z]' '[a-z]']) if [ -f $lowercase ] then echo "Erro - Arquivo já existe!" exit 3 fi # troca o nome do arquivo /bin/mv $file $lowercase

Join the conversation