#!/bin/bash
trap 'onCtrlC' INTfunction onCtrlC () { echo 'Ctrl+C is captured'}
while true; do echo 'I am working!' sleep 1done