OK, aqui está um script que faz algo parecido com o que você quer.
#!/bin/bash
NEWFILES=${1}
INSERT_IDX=${2}
PREFIX="titlepage_"
# just in case
prefixnum=${filebase//[^0-9]/}
case $prefixnum in
(*[![:blank:]]*) echo "invalid prefix, contains numbers"; exit 1;;
esac
# check input arguments
if [ ! $# -eq 2 ];
then
echo "USAGE: insert.sh <newfiles> <insertion_index>"
echo 'example: insert.sh "new.pdf new.tex" 2'
exit 1
fi
## process infiles
for infile in ${NEWFILES}
do
ext=${infile##*.}
for file in $(ls -1 ${PREFIX}[0-9]*.${ext} | sort -rV)
do
filebase=${file%.*}
number=${filebase//[^0-9]/}
numberless=${filebase//[0-9]/}
if [ "${numberless}${number}.${ext}" != "${file}" ];
then
echo "invalid file ${file}"
echo "${numberless}${number}.${ext}" "${file}"
exit 1
fi
if [ ${number} -ge ${INSERT_IDX} ]
then
echo "$file" "${numberless}$((${number} + 1))".$ext
mv "$file" "${numberless}$((${number} + 1))".$ext
else
echo ${file}
fi
done
echo "${infile}" "${PREFIX}${INSERT_IDX}.${ext}"
mv "${infile}" "${PREFIX}${INSERT_IDX}.${ext}"
done