#!/bin/bash # Remove all files ending with .out in the current directory # Safety check: ask for confirmation echo "This will delete all *.out files in $(pwd)" read -p "Are you sure? (y/N): " confirm if [[ $confirm == [yY] ]]; then rm -v -- *.out echo "All .out files removed." else echo "Aborted." fi