#!/bin/bash if [ $# -ne 3 ] ; then echo "Usage: " exit 1 fi kcov=$1 out=$2 prg=$3 $prg & pid=$! sleep 0.5 $kcov --pid=$pid $out $prg & kcov_pid=$! sleep 1.2 kill $kcov_pid