ls *pdf | ssed -R 's/(.*?) - .*pdf/\1/' | sort | uniq | while read i; do \ if ! (test -d "$i"); then echo $i; fi; done #change silly case errors ls | while read i; do mv "$i" "$( echo $i | sed 's/Macleod/MacLeod/')"; done