[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Netstat script?



On Saturday 19 February 2005 02:29, Alvin Oga wrote:
>On Sun, 20 Feb 2005, SigmaX wrote:
>> I know nothing about scripting, but I want to write/obtain a
>> script
>
>#!/bin/bash
>
>highlySecretScript()
>{
># > that
># > displays the results of the command "netstat -a | grep tcp"
>
>| egrep -iv "stuff that is ok|stuff that is allowed"
>
># then clears the screen
>
>reset
>clear
>
># > and does so again a few seconds later.
>
>sleep 5
^^^^^^^^
wrong place, data written and erased so fast it won't be readable. 
Put the reset & clear operations below the sleep 5.
>
>}
>
>>  Else I just need a
>> program that does something similar in the console, so I can view
>> it over SSH.
>
>you should ssh into the box anyway
>
>and/or run it from cron and email you the results you didnt expect
>
>c ya
>alvin

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.33% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.



Reply to: