for file in <files>; do [[ $? != 0 ]] && break echo -n "$file: " ext=$(cut -d. -f2 <<< "$file") base=$( stat -c '%y' "$file" | cut -d . -f 1 | tr : . ) name="$base".${ext,,}; echo $name mv "$file" "$name" done
for file in <files>; do [[ $? != 0 ]] && break echo -n "$file: " ext=$(cut -d. -f2 <<< "$file") base=$( stat -c '%y' "$file" | cut -d . -f 1 | tr : . ) name="$base".${ext,,}; echo $name mv "$file" "$name" done