diff options
Diffstat (limited to 'sh/loop')
| -rwxr-xr-x | sh/loop | 15 | 
1 files changed, 15 insertions, 0 deletions
| @@ -0,0 +1,15 @@ +#!/bin/sh + +while getopts t: opt; do +	case $opt in +		t) time="$OPTARG";; +		\?) exit 1;; +	esac +done +shift $((OPTIND-1)) + +while :; do +	# suggested by https://github.com/koalaman/shellcheck/wiki/SC2294 +	"$@" +	sleep "${time:-1}" +done | 
