#!/usr/bin/python import os for i in range(5): path = '/mnt/home/mysqlinst1/MysqlDistributedDB/' os.system('(time ' + path + 'run.sh ' + path + 'config.txt ' + path + 'sql.txt > /dev/null) 2>&1 | grep real')