Sponsored Content
Top Forums Shell Programming and Scripting Grep causing long delay (batching) whilst piping Post 302211399 by ghostdog74 on Thursday 3rd of July 2008 08:43:05 AM
Old 07-03-2008
what i meant is ( if you are able to modify your input script)

Code:
while some condition
do
 # somewhere here produces  
 # the input script output
 # at the same time 
 # store running averages. 
done

 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Long Delay if any with network services

While installing a firewall, I was pinging the interface from SCO 5.0.6 Openserver box, while no response, I hit "DEL" to cancel, but no cancel. Then all of a sudden I get BOO-KOO traffic lights on HUB and Switch.... Then a kernel trap error. System froze... Proceeded with a cold boot. Now I have... (8 Replies)
Discussion started by: nashvillek5
8 Replies

2. Shell Programming and Scripting

question about grep, cut, and piping

Howdy folks, I am fairly new to scripting but have lost of expirience in c++, pascal, and a few other. I am trying to complete a file search script that is sent a file name containing data to search that is arranged like this "id","name","rating" "1","bob","7" etc and an argument to... (1 Reply)
Discussion started by: dyrt
1 Replies

3. UNIX for Dummies Questions & Answers

Piping GREP

Hi, I need to use a double grep so to speak. I need to grep for a particular item say BOB and then for each successful result I need to grep for another item say SMITH. I tried grep "BOB" filename | grep "SMITH" but it does not seem to work. I can achieve my desired result using an... (12 Replies)
Discussion started by: mojoman
12 Replies

4. Shell Programming and Scripting

Piping STDOUT as pattern to grep or sed

$>cat file.txt 123 d3 234 abc 3 zyf 23 124 def 8 ghi kz0 ... ... I have the following output on the screen through <some command>. $> <some command> abc def ghi ... ... I have to search for each of these patterns in the file.txt and print the lines in file.txt matching the... (4 Replies)
Discussion started by: VNR
4 Replies

5. Ubuntu

Piping with grep

Hi everybody, I have a big file with blast results (if you know what this means, otherwise look at it just as a text file with a specific form). I am trying to extract some ids from within this file, which have certain parameters. For example, some Of my IDs have the term 'No hit results'... (1 Reply)
Discussion started by: frymor
1 Replies

6. Ubuntu

Piping with grep

Hi everybody, I have a big file with blast results (if you know what this means, otherwise look at it just as a text file with a specific form). I am trying to extract some ids from within this file, which have certain parameters. For example, some Of my IDs have the term 'No hit results'... (6 Replies)
Discussion started by: frymor
6 Replies

7. UNIX for Dummies Questions & Answers

Piping grep into awk, read the next line using grep

Hi, I have a number of files containing the information below. """"" Fundallinfo 6.3950 14.9715 14.0482 """"" I would like to grep for Fundallinfo and use it to read the next line? I ideally would like to read the three numbers that follow in the next line and... (2 Replies)
Discussion started by: Paul Moghadam
2 Replies

8. Solaris

SSH and telnet long delay to recieve prompt.

Hi guys. You'd have to excuse me a bit, as I'm a noob. I really try to avoid asking questions and do research for whatever linux issues that may arise. I am experiencing a long wait for the shell to come up when I ssh or telnet into a Sunos 5.10 environment. It takes 70 seconds to give me... (12 Replies)
Discussion started by: gpenco
12 Replies

9. OS X (Apple)

Piping to grep with pbpaste

cat file 1 aaa 2 bbb 3 ccc 4 ddd In TextEdit, I then copy the characters “ccc” to the clipboard. The problem is that the following command gives no output: bash-3.2$ pbpaste | grep - file Desired output: 3 ccc What should the syntax be for that command? I am using MacOS El... (3 Replies)
Discussion started by: palex
3 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 06:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy