#!/bin/bash ctrl_c() { exit; } for (( ; ; )) do trap ctrl_c INT timeout --foreground 150 mon2cam -m 0 sleep 1 done