aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/read.sh
blob: 38535e6f5b696fa6edf8ad37c53959243b819428 (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} ./hack.out ${pid} read 8 > /tmp/out 2> /dev/null && pr -t -m ${scanfile} /tmp/out"