ansitest/topterm9.sh
2023-09-10 18:47:02 -05:00

13 lines
262 B
Bash

#!/bin/bash
result=$(ps ax |awk '/tty9/ {print $5}' |grep -c top)
if [ $result -eq 0 ]; then
# open top on vt9
setterm -blank 0 2>/dev/null
( TERM=linux openvt -f -c 9 -w -- /usr/bin/top -d 15 ) &
else
echo "WARNING topterm9 already running - skipping"
fi