#!/bin/sh # z.sh 0.1 # Copyright (C) 2004-2005 John Eriksson # # Description: # Renames songs that have no track number in the filename. # Usage: z.sh [NUM] [FILENAME] if [ -z "$2" ]; then echo "enter first number then filename." exit 1 fi NUM="$1" ARTIST="`echo $2 | cut -f1 -d\-`" SONG="`echo $2 | cut -f2,3,4,5 -d\-`" mv "$2" "${ARTIST}- ${1} -${SONG}" # EOF .