#!/bin/bash for i in $(ls); do CR_NAME="$i" MV_NAME=$(echo "$i" | sed -e 's|\([a-zA-Z]*\).\([a-z]*\)|\1|g') mv "$CR_NAME" "$MV_NAME" done