Acesse aqui!!!!
Ai vai o Oitavo script da série:
Tirando Espaços e Padronizando Arquivos
Obs.: É só rodar e esperar, pois não existem parâmetros neste Script.
Dependências:
(
echo “# Estamos trabalhando, por favor aguarde o processo terminar !!!”
rename ‘y/A-Z/a-z/’ *
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘s/ /_/g’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-X-W-Y-Z/a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-x-w-y-z/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Á/a/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/É/e/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Í/i/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Ó/o/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Ú/u/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/á/a/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/é/e/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/í/i/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/ó/o/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/ú/u/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Ç/c/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Ã/a/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Ĩ/i/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Õ/o/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Ũ/o/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Ü/u/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Â/a/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Ê/e/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Ẽ/e/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Î/i/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Ô/o/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/Û/u/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/ç/c/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/ã/a/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/ẽ/e/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/ĩ/i/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/õ/o/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/ũ/u/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/ü/u/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/â/a/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/ê/e/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/î/i/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/ô/o/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/û/u/’`”;done
### Trocar os ()[]{}ªº°!?@ sobrando por _
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/(/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/)/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/[/_/'`";done
find | while read FN;do mv "$FN" "`echo $FN | sed -r -e 'y/]/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/ª/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/º/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/°/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/!/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/?/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/@/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/#/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/$/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/%/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/&/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/_././’`”;done
### Trocar os – sobrando por _
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/-/_/’`”;done
find | while read FN;do mv “$FN” “`echo $FN | sed -r -e ‘y/_-_/_/’`”;done
### Trocar os pontos sobrando por vazio
for FILE in $(find . -type f -name ‘*……*’); do NEWNAME=$(echo $FILE|sed s/’……’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*…..*’); do NEWNAME=$(echo $FILE|sed s/’…..’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*….*’); do NEWNAME=$(echo $FILE|sed s/’….’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*…*’); do NEWNAME=$(echo $FILE|sed s/’…’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*..*’); do NEWNAME=$(echo $FILE|sed s/’..’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*_.*’); do NEWNAME=$(echo $FILE|sed s/’_.’/./); mv -v $FILE $NEWNAME; done
### Trocar os traços sobrando por vazio
for FILE in $(find . -type f -name ‘*__________*’); do NEWNAME=$(echo $FILE|sed s/’__________’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*_________*’); do NEWNAME=$(echo $FILE|sed s/’_________’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*________*’); do NEWNAME=$(echo $FILE|sed s/’________’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*_______*’); do NEWNAME=$(echo $FILE|sed s/’_______’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*______*’); do NEWNAME=$(echo $FILE|sed s/’______’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*_____*’); do NEWNAME=$(echo $FILE|sed s/’_____’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*____*’); do NEWNAME=$(echo $FILE|sed s/’____’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*___*’); do NEWNAME=$(echo $FILE|sed s/’___’/_/); mv -v $FILE $NEWNAME; done
for FILE in $(find . -type f -name ‘*__*’); do NEWNAME=$(echo $FILE|sed s/’__’/_/); mv -v $FILE $NEWNAME; done
echo “# Trabalho terminado !!! Bom trabalho!!!!”
) | zenity –progress –width 200 –height 100 –title “Informação do Sistema” –text “Informação do Sistema” –pulsate –auto-close
0sem comentários ainda
Por favor digite as duas palavras abaixo