#!/bin/bash # find out my host name hn=$(hostname) # install iperf yum -y install iperf # start up the server on host 'left' and client on host 'right' if [ $hn == "left" ] then iperf -s &> /var/www/html/iperf-server.log & else iperf -c left &> /var/www/html/iperf-client.log & fi