Created
March 25, 2015 01:14
-
-
Save j1cs/9c253de60fb791b768aa to your computer and use it in GitHub Desktop.
Letras minúsculas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# lowerit | |
# Convertir todos los nombres de los archivos en el directorio actual a minúsculas | |
# Sólo opera en archivos planos - no cambia el nombre de los directorios | |
# Solicitará la verificación antes de sobrescribir un archivo existente | |
for x in `ls` | |
do | |
if [ ! -f $x ]; then | |
continue | |
fi | |
lc=`echo $x | tr '[A-Z]' '[a-z]'` | |
if [ $lc != $x ]; then | |
mv -i $x $lc | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment