#!/bin/sh DT=$(date +%s) CT=$(stat -c %Z capture.time) if [ $(( DT - CT )) -gt $INTERVAL ];then echo bad false else echo good true fi