titolo canzone insulsa - artista fighetto strapagato.mp3
in
artista fighetto strapagato - titolo canzone insulsa.mp3
Codice: Seleziona tutto
#!/bin/bash
echo ""
echo "Rinomina mp3 v.1.2.13 - (C) berto"
echo ""
ls *.mp3 > elencocosielfici
quanti=`cat elencocosielfici | wc -l`
echo "$quanti"" Files mp3 schifosi trovati."
for ((j=1;j<=quanti;j++)); do
# echo "Lavoro sul file "$j" dell'elenco"
nomefile1=`cat elencocosielfici | head -n $j | tail -n 1`
lungnome1=`echo "$nomefile1" | wc -c`
# echo $lungnome1
let lungnoext="$lungnome1"-5
# echo $lungnoext
artista=`echo "$nomefile1" | cut -c 1-$lungnoext | cut -f 2 -d "-" | cut
-c 2-1000`
canzone=`echo "$nomefile1" | cut -f 1 -d "-"`
lungcanzone=`echo "$canzone" | wc -c`
let lungcanzone="$lungcanzone"-2
canzone=`echo "$canzone" | cut -c 1-$lungcanzone`
nomefile2="$artista"" - ""$canzone"".mp3"
echo ""
echo "$nomefile1"" diventa ""$nomefile2"
mv "$nomefile1" "$nomefile2"
done
echo ""
echo "FORMAT C: eseguito."
qualche if, qualche wc...
--
e al loro dio perdente non credere mai