#!/bin/sh # prompt y/n and, only after entering y, delay 5 seconds and execute the given command. # arguments: command ... read -p "are you sure? [y/N]" -r reply if [ "$reply" = "y" ] then echo waiting 5 seconds... sleep 5 echo command execution started $* fi