Anything smaller than sleep 1


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Anything smaller than sleep 1
# 1  
Old 04-07-2006
Anything smaller than sleep 1

I'm writting a shell script to email customers invoices.
after each RCPT to: email@address.com, i've put in a sleep 1 command,
but with 2000 customers to email and about 5 or 6 of these sleep commands it can take a very long time.

Is there any smaller amount of time the sleeper can sleep for that 1 second?
# 2  
Old 04-07-2006
Is that you are going to mail the same subject and content to all the n-receipients?

then a single mailx command would do !!!

First of all why do you need a sleep command when you are sending mails to n-receipients!!!
# 3  
Old 04-07-2006
He may be looking at his queue getting backed up and wants the sleep to avoid it - not that it matters much. The system should just queue them up and send them out.

You can do a sleep 0. That will 'slow' it down for the time that it takes the system to run the sleep command (milliseconds) and then continue on.
# 4  
Old 04-07-2006
Thank

Yep thats brilliant. Why didn't I just think out of the box!!
Thanks
# 5  
Old 04-07-2006
Also it could be that each of his 2000 customers gets a different invoice.

A couple solution are mentioned in this thread.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help me to find a greater than or smaller than values

Hi, i need to find one of the value from my file is in between two numbers, that is the value is greater than 34 and smaller than 50, Ex: File.txt col1 col2 col3 col4 1 Name1 93 w 2 Name2 94 a 3 Name3 32 b 4 Name4 45 x 5 Name5 50 y 6 Name6 49 z here i need to find col3 values are... (7 Replies)
Discussion started by: Shenbaga.d
7 Replies

2. Shell Programming and Scripting

Breaking out ip subnet to smaller subnets

I have a script and it works fine, but I am sure this can be shrunk down to something much better. I would appreciate someone taking a crack at it for me. What it does is take the ip block submitted and breaks it out down to /24's. #!/bin/ksh ipadd=${1} octet1=`echo $ipadd | nawk -F.... (3 Replies)
Discussion started by: numele
3 Replies

3. Shell Programming and Scripting

Number of lines smaller than specified value

Hi All, I have a problem to find number of lines per column smaller than the values given in a different file. In example, compare the 1st column of file1 with the 1st line of the file2, 2nd column of file1 with the 2nd line of the file2, etc cat file1 0.2 0.9 0.8 0.5 ... 0.6 0.5... (9 Replies)
Discussion started by: senayasma
9 Replies

4. Shell Programming and Scripting

Wrapping 'sleep' with my 'resleep' function (Resettable sleep)

This is a very crude attempt in Bash at something that I needed but didn't seem to find in the 'sleep' command. However, I would like to be able to do it without the need for the temp file. Please go easy on me if this is already possible in some other way: How many times have you used the... (5 Replies)
Discussion started by: deckard
5 Replies

5. Shell Programming and Scripting

Converting Huge Archive into smaller ones

I have a 13G gz archive... The problem is that when I expand it, it goes to 300G and I don't have so much of hdd space. The file is a one huge file: rrc.tar.gz. What I want to do is to extract the archive but at each step gzip the resulting file. So, if gunzip -c rrc00.tar.gz | tar -xvf - ... (9 Replies)
Discussion started by: Legend986
9 Replies

6. Shell Programming and Scripting

Grab a smaller and larger value

Hi All, I am trying to grab a term which is just smaller and larger than the assigned value using the below code. But there seems to be some problem. The value i assign is 25 so i would expect it to output a smaller value to be 20 instead of 10 and 20 and larger value to be 30 instead of 30 and... (3 Replies)
Discussion started by: Raynon
3 Replies

7. Post Here to Contact Site Administrators and Moderators

Smaller splash graphic

Not to complain, but the large graphic at the top of the page ensures that I have to scroll down everytime I change pages. Maybe the problem is the 1024x768 of my laptop screen, but it does seem excessive. Keith (2 Replies)
Discussion started by: kduffin
2 Replies
Login or Register to Ask a Question