#!/bin/bash

source_file="$1"
destination_file="$2"

echo -n "Destination file already exists. Do you want to overwrite? (y/n): "
read answer

  case "$answer" in
    y|Y)
      cp "$source_file" "$destination_file"
      ;;
    n|N)
      echo "Operation cancelled."
      exit 1
      ;;
    *)
      echo "Invalid response. Operation cancelled."
      exit 1
      ;;
  esac
else
  cp "$source_file" "$destination_file"
fi