* Juan Guil <erjuak/at/ono/dot/com> [2002-12-14 00:49 (2002)] > Alguien sabe con un script en shell o un comando de bash (que la verdad que > no estoy muy puesto) > pasar un directorio que sus archivos estan en en mayuscula a minuscula: > ejemplo: > APPA_02.HTM* CH02_01.HTM* CH04_09.HTM* CH08_03.HTM* CH10_06.HTM*
#!/bin/sh # lowerit # convert all file names in the current directory to lower case # only operates on plain files--does not change the name of directories # will ask for verification before overwriting an existing file 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 -- Rafael Gawenda 2:346/[EMAIL PROTECTED] Registered LiNUX user #93375 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Primero el hombre aprende en la vida a andar y a hablar. Más tarde, a sentarse tranquilo y mantener la boca cerrada (Shirley MacLaine)
pgp48iSvZRP0U.pgp
Description: PGP signature