I am trying to create a shell script that is able to run the Filebench benchmark utility. Filebench allows you perform a variety of FileIO tests to ascertain performance. To run it manually you first type >sudo filebench – this then gives you the following prompt >filebench> – you then type >load – and finally the duration of the test >run 60. I have been attempting to do this with the following script but it just hangs at the filebench> prompt waiting for more input.
#! /bin/bash
sudo filebench
load filemicro_seqread
run 60
echo "Starting test" $(date +"%H:%M:%S") >> seqRead.txt
Thanks in advance,
Untested, but will this work?:
read more about “here documents” here