#!/bin/bash if [ "$#" -ne 1 ] then printf "Usage: %s \n" "$0" exit 1 fi scanfile=${SCANFILE:-/tmp/scanfile} pid="$1" watch -d -n 1 "xargs -r -a ${scanfile} ./hack.out ${pid} read 8 > /tmp/out 2> /dev/null && pr -t -m ${scanfile} /tmp/out"