#!/bin/bash # Find all files containing "nanofur" (case-insensitive) in the current directory and subdirectories find . -type f -iname '*nanofur*' | while read -r file; do # Construct the new file name by replacing "nanofur" with "nanofurfur" (case-insensitive) new_file=$(echo "$file" | sed -E 's/[Nn][Aa][Nn][Oo]/nanofurfur/g') # Rename the file mv "$file" "$new_file" done echo "Renaming complete for all directories!"