LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-25-2007, 11:04 AM   #1
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 675
Blog Entries: 11

Rep: Reputation: 36
shell script question


How do you make a shell script in bash pause for a number of seconds? Thanks in advance. I want to wait for something to happen and then start something else that relies on the first thing. -Dave
 
Old 03-25-2007, 11:34 AM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
You could use the sleep command. I have as used ping command to pause as well.
ping -c10 127.0.0.1 > /dev/null

Brian
 
Old 03-25-2007, 11:43 AM   #3
bsdunix
Senior Member
 
Registered: May 2006
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757

Rep: Reputation: 80
A while loop might be what you want:

http://www.tech-recipes.com/bourne_s...g_tips316.html

Or until loop:

http://tldp.org/LDP/Bash-Beginners-G...ect_09_03.html
 
Old 03-25-2007, 12:38 PM   #4
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 675
Blog Entries: 11

Original Poster
Rep: Reputation: 36
'sleep' is what I probably want. I was 'man'-ing 'wait'. NOT the same. Thanks!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script Question Whiteghost Programming 4 09-25-2005 10:05 PM
shell script question Whiteghost Programming 17 09-10-2005 06:52 PM
shell script question rrwhite Linux - General 3 09-15-2004 01:01 AM
Shell script question. siaful Linux - Newbie 1 04-29-2004 05:01 PM
Help me!!!!!shell script question!!!!!! yulitao Programming 2 03-23-2004 03:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration