simple question

simple question

Post by Raymond I » Fri, 19 Dec 1997 04:00:00



Hi, I'm not a unix programmer so I don't know much.

I want to write a little batch program straight off the command line.
For instance, I want to

ls
sleep 3

and have it loop.  What do I type at the sh command line to do this?

Thanks,
Ray

 
 
 

simple question

Post by Mariusz Scislowsk » Fri, 19 Dec 1997 04:00:00



> Hi, I'm not a unix programmer so I don't know much.

> I want to write a little batch program straight off the command line.
> For instance, I want to

> ls
> sleep 3

> and have it loop.  What do I type at the sh command line to do this?

> Thanks,
> Ray

Try

while :
do
ls
sleep 3
done

mariusz



 
 
 

simple question

Post by Dr. » Mon, 22 Dec 1997 04:00:00


: Hi, I'm not a unix programmer so I don't know much.

: I want to write a little batch program straight off the command line.
: For instance, I want to

: ls
: sleep 3

: and have it loop.  What do I type at the sh command line to do this?

while [ true ]
do
        ls
        sleep 3
done

Will loop endlessly running any command between 'do' and 'done'.

Stephen

 
 
 

1. A simple question deserving a simple answer

: What does Unix (Specifically Linux) look like?  

A bunch of ones and zeros ;-)

: Is it like Dos? Windows?

No, thank God.

: Something else?

Yes.

There's a simple answer...

--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming

2. red flashing boxes

3. Simple question from simple user

4. How does my machine function with SLIP/PPP?

5. simple question about simple code

6. nntpd that supports mode reader?

7. Simple question for us simple minded.

8. For KPPP users: Feedback wanted!

9. Simple question - simple answer?

10. Simple question: want to do "rm -rf * .*"

11. A real simple question.

12. simple question?

13. simple questions