diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-03-23 08:04:10 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-03-23 08:04:10 +0200 |
commit | 4b05862b26330e28f0f2354c57fa5feeb0ee22e2 (patch) | |
tree | e9577a29a2a277efe58d26af746ce67c367a03ed | |
parent | 247d61da1baa2b2d1bbbc5eafa2b47a2e261d589 (diff) | |
download | extrautils-4b05862b26330e28f0f2354c57fa5feeb0ee22e2.tar.gz |
feat: add new script, "repeat"
-rw-r--r-- | Makefile | 1 | ||||
-rwxr-xr-x | repeat | 12 |
2 files changed, 13 insertions, 0 deletions
@@ -14,6 +14,7 @@ scripts = \ prettyml \ prettyson \ print-argv \ + repeat \ ssl-cert-gen \ totp @@ -0,0 +1,12 @@ +#!/bin/bash + +set -eu -o pipefail + +n="$1" +shift + +i=0 +while [ "$i" -lt "$n" ] && "$@" +do + i=$(( "$i" + 1 )) +done |