#!/bin/bash # addprefix <prefix> <ext> SAVEIFS=$IFS IFS=$(echo -en "\n\b") prefix=$1 ext=$2 for i in $( ls *.$ext ); do echo "Moving $i to $prefix$i" mv $i $prefix$i done echo "Finished :)" IFS=$SAVEIFS