ansitest/topterm9.sh

13 lines
262 B
Bash
Raw Permalink Normal View History

2023-05-03 10:42:56 -05:00
#!/bin/bash
2023-09-10 18:47:02 -05:00
result=$(ps ax |awk '/tty9/ {print $5}' |grep -c top)
if [ $result -eq 0 ]; then
2023-05-03 10:42:56 -05:00
# 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
2023-09-10 18:47:02 -05:00