batch rename files with ids intact
问题 i have a directory listing like seascaperecovered0088crop.jpg seascaperecovered0096crop.jpg seascaperecovered0098crop.jpg seascaperecovered0101crop.jpg seascaperecovered0103crop.jpg seascaperecovered0105crop.jpg seascaperecovered0107crop.jpg seascaperecovered0112crop.jpg seascaperecovered0119crop.jpg seascaperecovered0122crop.jpg and i want to rename all files as seen here: seascape_0122.jpg i have tried something like this: for f in `ls | egrep 'seascaperecovered.*\.jpg'`; do mv $f ${f