diff --git a/mtime.sh b/mtime.sh new file mode 100755 index 0000000..f02b3c1 --- /dev/null +++ b/mtime.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +max=$1 +while read -r line; do + echo -ne $( (/usr/bin/time -f "%U+%S" ./repeat.sh $max $line ) 2>&1 | bc ) + echo -e "\t$line" +done + diff --git a/repeat.sh b/repeat.sh new file mode 100755 index 0000000..5b7f4e5 --- /dev/null +++ b/repeat.sh @@ -0,0 +1,5 @@ +#!/bin/sh +max=$1; shift; +for ((i=1; i <= max ; i++)); do # --> C-like syntax + eval "$@" &>/dev/null; +done