#!/bin/bash

# Prompt for the extension
read -p "Enter the file extension (e.g., 'txt', 'jpg'): " extension

# Prompt for the source directory (. for current)
read -p "Enter the source directory (. for current): " source_dir

# Prompt for the destination directory
read -p "Enter the destination directory: " dest_dir

# Ensure the source directory exists
if [ ! -d "$source_dir" ]; then
	echo "Source directory '$source_dir' does not exist."
	exit 1
fi

# Ensure the destination directory exists or create it
if [ ! -d "$dest_dir" ]; then
	mkdir -p "$dest_dir"
fi

# Copy files with the specified extension
find "$source_dir" -type f -name "*.$extension" -exec cp {} "$dest_dir" \;

echo "Files with the '$extension' extension copied from '$source_dir' to '$dest_dir'."
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence