#!/bin/bash # run bash command x number of times # ie. 'runx 10 echo "Hello"' will print Hello 10 times # partially from: https://stackoverflow.com/questions/3737740/is-there-a-better-way-to-run-a-command-n-times-in-bash function runx() { for _ in $(seq "$1"); do eval ${*:2} done }