#!/usr/bin/env zsh while read name ; do (( i++ )) print -f %02d -v num $i print -r mv track${num}.cdda.wav ${num}.${(qq)name}.wav done