#!/bin/bash for x in $@ ; do echo -en `expr match "$x" '\(.*\)_'`,`expr match "$x" '.*_\(.*\)'`, # warm up the cache for i in 1 2 3 ; do ./$x &> /dev/null ; done # real benchmarking for i in `seq 1 10`; do ./$x ; done echo; done