Il giorno gio, 29/06/2006 alle 15.26 +0200, InSa ha scritto: > ----------------------- > #!/bin/bash > # renames.sh > # basic file renamer > > for i in "$( ls *est )";
for i in *est; <blah blah blah> > do > # faccio delle mega-trasformazioni > temp=$(echo "$i" | sed -e "s/\./\ /"g) > temp2=$(echo "$temp" | sed -e "s/\ est/\.est/"g) occhio perche' se il tuo file si chiama originale.01.est in temp2 avrai originale 01.est cosa bruttina da maneggiare per mv. > <cut> > # ed altre cose fino alla variabile temp5 > > echo "$temp" #stampo il nome originale > echo "$temp5" #stampo il nome trasformato > > mv "$temp" "$temp5" > done Evita gli apici doppi inutili, non che sia sbagliato, ma personalmente credo appesantiscano la lettura. ciao Filo -- Filippo Biondi [Ubuntu|Debian] GNU User Linux Registered User #357105 Proud member of .:ERLUG:. no1984.org member - Stop TCG! -- Per REVOCARE l'iscrizione alla lista, inviare un email a [EMAIL PROTECTED] con oggetto "unsubscribe". Per problemi inviare un email in INGLESE a [EMAIL PROTECTED] To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]