#!/bin/bash

# Loop over all files and directories in the current directory
for item in *; do
  # Get the new name without the extra dot at the end
  new_name=$(basename "$item" | sed 's/\.$//')

  # Check if the new name is different from the old name
  if [[ "$new_name" != "$item" ]]; then
    # Rename the file or directory
    mv "$item" "$new_name"
  fi
done
