Sponsored Content
Top Forums Shell Programming and Scripting how to introduce delay in the script??(urgent) Post 302177804 by TinCanFury on Sunday 23rd of March 2008 11:10:54 AM
Old 03-23-2008
there is a command called
sleep

do a man sleep
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Insert a delay in a script

Hi all, i need help. I want to write a script and insert a delay time of 10 seconds. Which is the command for do this? Thanks in advance (1 Reply)
Discussion started by: christian
1 Replies

2. Shell Programming and Scripting

adding delay in script

Hi Expert, I need to run some command 5 times with 5 mins interval whenever one of the application on server hang. Can I use below scripts ? Thanks! ------------- #!/bin/sh command1 sleep 300 command2 sleep 300 command3 sleep 300 command4 sleep 300 command5 sleep 300... (2 Replies)
Discussion started by: skully
2 Replies

3. UNIX for Dummies Questions & Answers

Let my introduce myself and one doubt!!!!

Hello, My name is John. I am from Spain and I am learning Linux and how to use it. I hope to learn more in this forum. I am developing a new application, and I have a doubt: Can I read a file, line by line, in C programm? Best regards. (1 Reply)
Discussion started by: webquinty
1 Replies

4. Shell Programming and Scripting

Want to have delay in multiple instances of the same shell script

Hello, My goal is to run the same Shell script in a parallel mode. This script will get triggered from different machines and different application teams by some job scheduling tool. They may trigger the process at the same time. so I want to have them in QUEUE ..and release them for execution on... (3 Replies)
Discussion started by: chetan_sonar
3 Replies

5. Shell Programming and Scripting

How to introduce delay in Shell Script till a key stroke.

Hi All, How to introduce delay in the Bash/Shell Script till key stroke. Below is the requirement.. 1.Execute set of commands. 2.Display the message echo "press any key to continue" Introduce a delay till key stroke. 3.Execute next set of commands. Thanks in Advance Sunil.K (5 Replies)
Discussion started by: sunilrk07
5 Replies

6. Shell Programming and Scripting

How do I do a short delay (milliseconds) in a shell script?

I need to put a small delay into a shell script. I'm looking for something smaller than "sleep" - a second is way too long. I want to sleep something like 10 milliseconds. I've tried "usleep" and "nanosleep", but the script doesn't recognize them. I'm using the bash shell but I'm willing to... (9 Replies)
Discussion started by: harmlesscat
9 Replies

7. Solaris

Create files to introduce with ZFS

Hello, To learn ZFS, i try to create pool . and for that i want create 10 files with 512MB (because i dont have multiple disks and multiple controllers) ADMIT THAT THIS IS TEN HIGH-PERFORMANCE HARD DRIVES To get this 10 files,all of them have the same size : 512MB, I do these... (9 Replies)
Discussion started by: herbich1985
9 Replies

8. UNIX for Dummies Questions & Answers

Is it possible to introduce a character using sed?

I need to reformat a text using sed command like Text: 160845 Output: 16:08:45 Please help me how this can be done using sed. Thanks in adv (1 Reply)
Discussion started by: siteregsam
1 Replies

9. Shell Programming and Scripting

Delay in running script from crontab

I am facing an issue where sometimes crontab is running script with some delay. Below is the stmt in script and it is the only stmt in script. echo "running at `date` " >> CRONCHECK.log Below is the cron entry. 0 11 * * * CRONCHECK.sh Below is the time of run each day. running at Fri... (8 Replies)
Discussion started by: Nishant Singh
8 Replies

10. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies
delay(9F)                                                  Kernel Functions for Drivers                                                  delay(9F)

NAME
delay - delay execution for a specified number of clock ticks SYNOPSIS
#include <sys/ddi.h> void delay(clock_t ticks); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
ticks The number of clock cycles to delay. DESCRIPTION
delay() provides a mechanism for a driver to delay its execution for a given period of time. Since the speed of the clock varies among sys- tems, drivers should base their time values on microseconds and use drv_usectohz(9F) to convert microseconds into clock ticks. delay() uses timeout(9F) to schedule an internal function to be called after the specified amount of time has elapsed. delay() then waits until the function is called. Because timeout() is subject to priority inversion, drivers waiting on behalf of processes with real-time constraints should use cv_timedwait(9F) rather than delay(). delay() does not busy-wait. If busy-waiting is required, use drv_usecwait(9F). CONTEXT
delay() can be called from user and kernel contexts. EXAMPLES
Example 1: delay() Example Before a driver I/O routine allocates buffers and stores any user data in them, it checks the status of the device (line 12). If the device needs manual intervention (such as, needing to be refilled with paper), a message is displayed on the system console (line 14). The driver waits an allotted time (line 17) before repeating the procedure. 1 struct device { /* layout of physical device registers */ 2 int control; /* physical device control word */ 3 int status; /* physical device status word */ 4 short xmit_char; /* transmit character to device */ 5 }; 6 7 . . . 9 /* get device registers */ 10 register struct device *rp = ... 11 12 while (rp->status & NOPAPER) { /* while printer is out of paper */ 13 /* display message and ring bell */ /* on system console */ 14 cmn_err(CE_WARN, "^07", 15 (getminor(dev) & 0xf)); 16 /* wait one minute and try again */ 17 delay(60 * drv_usectohz(1000000)); 18 } SEE ALSO
biodone(9F), biowait(9F), cv_timedwait(9F), ddi_in_panic(9F), drv_hztousec(9F), drv_usectohz(9F), drv_usecwait(9F), timeout(9F), untime- out(9F) Writing Device Drivers SunOS 5.10 15 Oct 2001 delay(9F)
All times are GMT -4. The time now is 11:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy