Sponsored Content
Top Forums Shell Programming and Scripting how to introduce delay in the script??(urgent) Post 302177803 by wrapster on Sunday 23rd of March 2008 11:07:50 AM
Old 03-23-2008
how to introduce delay in the script??(urgent)

Hi all,

i would like to know how to introduce a delay in the execution of a cmd?

am trying to copy a file which is about 650 mb and then perform some actions on it..
however since its huge i would like to introduce a delay in exection until the process is over

i dont want it to proceed to next statement unless this is over..

if [$? -eq 0] then
<do somethng>
else
<give error>
fi

this is the script that had included after the cp statement but am always directed to the else part of the loop Smilie

other thing i tried was to introduce a wait statemnt..
but there is already another process that is to be run in BG ,so when i use $! it refers to that old process(i hope!!).

so is there a way to address many bg process, also anyway to capture the pid of the particular process i need..

Hence i would like to know how to introduce a delay in the script..
This is not a regular script , its a rc script!!!

pls advice accordingly
 

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
PAM_FAILDELAY(8)						 Linux-PAM Manual						  PAM_FAILDELAY(8)

NAME
pam_faildelay - Change the delay on failure per-application SYNOPSIS
pam_faildelay.so [debug] [delay=microseconds] DESCRIPTION
pam_faildelay is a PAM module that can be used to set the delay on failure per-application. If no delay is given, pam_faildelay will use the value of FAIL_DELAY from /etc/login.defs. OPTIONS
debug Turns on debugging messages sent to syslog. delay=N Set the delay on failure to N microseconds. MODULE TYPES PROVIDED
Only the auth module type is provided. RETURN VALUES
PAM_IGNORE Delay was successful adjusted. PAM_SYSTEM_ERR The specified delay was not valid. EXAMPLES
The following example will set the delay on failure to 10 seconds: auth optional pam_faildelay.so delay=10000000 SEE ALSO
pam_fail_delay(3), pam.conf(5), pam.d(5), pam(7) AUTHOR
pam_faildelay was written by Darren Tucker <dtucker@zip.com.au>. Linux-PAM Manual 06/04/2011 PAM_FAILDELAY(8)
All times are GMT -4. The time now is 08:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy