Time delay for awk


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Time delay for awk
# 1  
Old 10-24-2010
Time delay for awk

I have an awk script, and want to introduce a time delay. How can I do this?
# 2  
Old 10-24-2010
Code:
system("sleep 5");

# 3  
Old 10-24-2010
Can system do sub-second sleeps?
# 4  
Old 10-24-2010
System doesn't really care, that depends on your sleep implementation.

This works for me:
Code:
system("ksh93 -c \"sleep 0.5\"");

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Sendmail delay: 3 mins 11 secs... Every time.

Hi all, I would like some help with a sendmail problem: We have a new system comprising of 4 T7-1 servers, each hosting 5 LDOMs, all domains running Solaris 11.3 All emails sent from every one of these domains (including the control domains) sit in the queue for 3 mins 11 secs (sometime 3m 12s,... (11 Replies)
Discussion started by: Mysturji
11 Replies

2. Shell Programming and Scripting

Awk: time intervals based on epoch time

I have a list of epoch times delimited by "-" as follows: 1335078000 - 1335176700 1335340800 - 1335527400 1335771300 - 1335945600 1336201200 - 1336218000 The corresponding dates are: 20120422 1000 - 20120423 1325 20120425 1100 - 20120427 1450 20120430 1035 - 20120502 1100 ... (3 Replies)
Discussion started by: alex2005
3 Replies

3. Programming

Find gaps in time data and replace missing time value and column 2 value by interpolation in awk

Dear all, I am kindly seeking assistance on the following issue. I am working with data that is sampled every 0.05 hours (that is 3 minutes intervals) here is a sample data from the file 5.00000 15.5030 5.05000 15.6680 5.10000 16.0100 5.15000 16.3450 5.20000 16.7120 5.25000... (4 Replies)
Discussion started by: malandisa
4 Replies

4. Emergency UNIX and Linux Support

Time delay problem in asking password

Hi All, I have solaris-11 global and multiple non-global zones running, which all are on same network. They are not in NIS. When we open putty session and give user-name, it takes long time in asking password (around 40-50 seconds) on Global zone. While on non-global zones, it is working... (9 Replies)
Discussion started by: solaris_1977
9 Replies

5. UNIX for Dummies Questions & Answers

Converting string date time to unix time in AWK

I'd like to convert a date string in the form of sun aug 19 09:03:10 EDT 2012, to unixtime timestamp using awk. I tried This is how each line of the file looks like, different date and time in this format Sun Aug 19 08:33:45 EDT 2012, user1(108.6.217.236) all: test on the 17th ... (2 Replies)
Discussion started by: bkkid
2 Replies

6. Shell Programming and Scripting

Calculating the epoch time from standard time using awk and calculating the duration

Hi All, I have the following time stamp data in 2 columns Date TimeStamp(also with milliseconds) 05/23/2012 08:30:11.250 05/23/2012 08:30:15.500 05/23/2012 08:31.15.500 . . etc From this data I need the following output. 0.00( row1-row1 in seconds) 04.25( row2-row1 in... (5 Replies)
Discussion started by: ks_reddy
5 Replies

7. Shell Programming and Scripting

Calculating delay time - bash

Hi, I am having the following problem. test > hourOfDay=06 ; delayTime=$(((9-$hourOfDay)*60)) ; echo $delayTime 180 test > hourOfDay=07 ; delayTime=$(((9-$hourOfDay)*60)) ; echo $delayTime 120 test > hourOfDay=08 ; delayTime=$(((9-$hourOfDay)*60)) ; echo $delayTime bash: (9-08: value... (5 Replies)
Discussion started by: jbsimon000
5 Replies

8. Solaris

lock time delay

I have a Sol system. The lock timeout is default 15 minutes. I tried to make it longer but cannot by lock -t timeout Anyon can tell me the cmd in solai for this please. A thank in advance (2 Replies)
Discussion started by: part-time-user
2 Replies

9. BSD

Reduce boot-time delay on FreeBSD?

Say for instance, I would like to reduce the delay/waiting time for the boot-time menu from 10 seconds to 5 seconds, how would I go about doing it? From what I've been able to find, entering "autoboot 5" into the right file would take care of that for me, but the man pages are unclear as to... (1 Reply)
Discussion started by: DownSouthMoe
1 Replies

10. UNIX for Dummies Questions & Answers

Delay in mv

Working on AIX 4.3 I have an active exe that accepts files for processing on our RS6000. Day to day i store these files in a secure place and at the end of the day I mv them one by one. After some reading and ofcourse trial and error i figured out that this helps... mv `ls -l |head -l | awk... (2 Replies)
Discussion started by: buRst
2 Replies
Login or Register to Ask a Question