On Sun, 20 Feb 2005, SigmaX wrote:
I know nothing about scripting, but I want to write/obtain a script that
displays the results of the command "netstat -a | grep tcp", then clears
the screen and does so again a few seconds later. Else I just need a
program that does something similar in the console, so I can view it
over SSH.
A very simple one for this
#!/bin/bash
while [ 1 ] ; do
netstat -a | grep tcp
sleep 1 # This is number of seconds
clear
done
That should do what you want on a very basic level
Rus