Find all files in the current directory and its subdirectories, and replace any 4-digit numbers with a random 4-digit number between 1000 and 9999.
find ~ -type f -exec sed -ri 's/[0-9]{4}/'$(shuf -i 1000-9999 -n 1)'/g' {} \;