Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/03/2009, 19:28
Avatar de -Defero-
-Defero-
Colaborador
 
Fecha de Ingreso: julio-2004
Ubicación: Guipúzcoa
Mensajes: 4.776
Antigüedad: 19 años, 11 meses
Puntos: 76
Respuesta: Mi primer shellscript

Más simple. En vez de esto:

Cita:
for i in `ls *.jpg` ; do
cp $i tmp/$i
Podrías haber hecho esto:

Cita:
cp *.jpg tmp/
Y si sólo querías cambiar el tamaño de las imágenes, con MOGRIFY es más sencillo. En vez de esto:

Cita:
for i in `ls *.jpg` ; do
convert $i -resize 350x350 $i
Podías haber hecho esto:

Cita:
mogrify -resize 350x350 *.jpg
Por otra parte, ¿para qué haces los respaldos si los borras inmediatamente?

Y ya para rizar el rizo... la nota de licencia es incorrecta. Por ejemplo, no especificas qué versión de la licencia es aplicable. Un ejemplo de nota de licencia bien escrita es el siguiente:

Cita:
Copyright (C) 2009 Arturo Peraza ([email protected])

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
O en castellano llano:

Cita:
Copyright (C) 2009 Arturo Peraza ([email protected])

Este programa es software libre: puedes redistribuirlo y/o modificarlo
bajo las condiciones de la GNU General Public License según es publicada por
la Free Software Foundation, bien la versión 3 de la Licencia, bien
(a tu elección) cualquier versión posterior.

Este programa se distribuye con la intención de resultar de utilidad,
pero SIN NINGUNA GARANTÍA; incluso sin garantía implícita de
COMERCIABILIDAD o ADECUACIÓN PARA CUALQUIER PROPÓSITO PARTICULAR.
Véase la GNU General Public License (Licencia Pública General GNU) para más detalles.

Deberías haber recibido una copia de la GNU General Public License
junto con este programa. En caso contrario, consulta <http://www.gnu.org/licenses/>.
__________________
abogado en Errenteria + procuradora en San Sebastián = equipo imparable