#!/bin/ksh if [[ $# -lt 2 ]]; then echo "Usage: $(basename $0) minutes file.mp3" echo 'Where minutes is the number of minutes to chop off of the front of file.mp3' echo 'This permanently destroys file.mp3 via "mv -i" !' exit 1 fi MIN="$1" FILE="$2" mp3splt -Q -a "$FILE" "$MIN"".0" EOF OUTPUTBEGIN="$(basename $FILE .mp3)"_"$MIN"m_00s__ mv -i "$OUTPUTBEGIN"*.mp3 "$FILE"