Re: [SLUG] Shell Scripts.. Time to learn

From: Kwan Lowe (kwan@digitalhermit.com)
Date: Sun May 15 2005 - 17:24:04 EDT


Chuck Hast wrote:
> Well this is the next piece. All I want to do is a simple little script that
> will read from a file in the /proc/network directory.
>
> I have a little script that has the following
>
> cat /proc/net/rose
> sleep 2
> Now I am trying to figure out how to loop it back, I guess I can jump out of
> it with a ^C. I am looking at the books and was hoping to find something
> along this line as a sample to follow.
>

You can use a while loop as follows:

while true
do
        cat /proc/net/rose
        sleep 2
done

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:59:00 EDT