trap

Automatically execute commands after receiving signals by processes or the operating system. Can be used to perform cleanups for interruptions by the user or other actions. More information: <https://manned.org/trap>.

Debian Debian
RUN apt-get update && \ apt-get install -y execline
Ubuntu
RUN apt-get update && \ apt-get install -y execline
Alpine
RUN apk add execline
image/svg+xml Kali Linux
RUN apt-get update && \ apt-get install -y execline
click the source code to copy install trap on any operating system with command-not-found.com