i have a directory listing like
seascaperecovered0088crop.jpg seascaperecovered0096crop.jpg seascaperecovered0098crop.jpg seascaperecovered0101crop.jpg seascape
With bash regular expressions
for file in *; do [[ "$file" =~ [0-9]+ ]] && mv "$file" seascape_${BASH_REMATCH[0]}.jpg done
Very straightforward:
for i in seascaperecovered*.jpg; do A=${i/crop/}; mv $i ${A/recovered/_}; done
(Put echo before the mv first for a dry run.)
echo
mv