aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/read.sh
blob: f26ba113ca1a4a692ee04996db814e3e1e98b53a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

if [ "$#" -ne 1 ]
then
    printf "Usage: %s <tracee_pid>\n" "$0"
    exit 1
fi

scanfile=${SCANFILE:-/tmp/scanfile}
pid="$1"
watch -d -n 1 "xargs -r -a ${scanfile} ./trainer ${pid} read 8 > /tmp/out 2> /dev/null && pr -t -m ${scanfile} /tmp/out"