hi,
i have to grep for string in file but i want to find the group of this line so i must get lines before and select the group.
the file look like :
####name_groupe1
alphanumeric line
alphanumeric line
..
####name_groupe2
alphanumeric line
alphanumeric line
..
####name_groupe3... (4 Replies)
Hi all,
I want to display line number for matching string in a file. can anyone please help me.
I used
grep -n "ABC" file
so it displays
6 ABC.
But i only want to have line number,i don't want that it should prefix matching context with line number.
Actually my original... (10 Replies)
As per my understanding below mentioned line of code finding a word 'boy' in $ACULOG...
num_errors=`grep -i -e fail -e illegal -e exception -e "<E" -e boy $ACULOG | wc -l`
if I'm not corerct, please correct me. How I can find entire line like "This is a boy" with something similar as above... (1 Reply)
Hi All,
Please tell me how can I Find a string using grep & print the line above or below that in solaris?
Please share as I am unable to use grep -A or grep -B as it is not working on Solaris. (10 Replies)
Hi all ,
I'm new to unix
I have a checked project , there exists a file called xxx.config .
now my task is to find all the files in the checked out project which references to this xxx.config file.
how do i use grep or find command . (2 Replies)
How can I recursively find all files in a directory and print out the file and first line number of any text blocks that match the below cases?
This would seem to involve find, xargs, *grep, regex, etc.
In summary, I want to find so-called empty "try-catch blocks" that do not contain code... (0 Replies)
Hello people!
I would like to create one script following this stage
I have one directory with 100 files
File001
File002
...
File100
(This is the format of content of the 100 files)
2012/03/10 12:56:50:221875936 1292800448912 12345 0x00 0x04 0
then I have one... (0 Replies)
In COBOL, a hyphen can be used in a field name and in a specific program some field names would be identical to others except a suffix was added--sometimes a suffix to a suffix was used. For example, assume I am looking for AAA, AAA-BBB, and AAA-BBB-CCC and don't want to look at AAA-BBB-CCC... (7 Replies)
Hello All,
While searching for the question, I found some answers but my implementation is not giving expected output.
I have two files; one is sourcefile, other is named template.
What I want to do is to search each line in template, when found all columns, cut the matching line from source... (4 Replies)
I am having trouble matching *two* strings from one file anywhere in a line of a second file, and could use some help getting this figured out. My preference would be to use grep for this because I would like to take advantage of its -A option. The latter is due to the fact that I would like both... (2 Replies)
Discussion started by: jvoot
2 Replies
LEARN ABOUT OSF1
aiowait
aiowait(3AIO) Asynchronous I/O Library Functions aiowait(3AIO)NAME
aiowait - wait for completion of asynchronous I/O operation
SYNOPSIS
cc [ flag... ] file... -laio [ library... ]
#include <sys/asynch.h>
#include <sys/time.h>
aio_result_t *aiowait(const struct timeval *timeout);
DESCRIPTION
The aiowait() function suspends the calling process until one of its outstanding asynchronous I/O operations completes, providing a syn-
chronous method of notification.
If timeout is a non-zero pointer, it specifies a maximum interval to wait for the completion of an asynchronous I/O operation. If timeout
is a zero pointer, aiowait() blocks indefinitely. To effect a poll, the timeout parameter should be non-zero, pointing to a zero-valued
timeval structure.
The timeval structure is defined in <sys/time.h> and contains the following members:
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
RETURN VALUES
Upon successful completion, aiowait() returns a pointer to the result structure used when the completed asynchronous I/O operation was
requested. Upon failure, aiowait() returns -1 and sets errno to indicate the error. aiowait() returns 0 if the time limit expires.
ERRORS
The aiowait() function will fail if:
EFAULT The timeout argument points to an address outside the address space of the requesting process. See NOTES.
EINTR The execution of aiowait() was interrupted by a signal.
EINVAL There are no outstanding asynchronous I/O requests.
EINVAL The tv_secs member of the timeval structure pointed to by timeout is less than 0 or the tv_usecs member is greater than the
number of seconds in a microsecond.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO aiocancel(3AIO), aioread(3AIO), attributes(5)NOTES
The aiowait() function is the only way to dequeue an asynchronous notification. It can be used either inside a SIGIO signal handler or in
the main program. One SIGIO signal can represent several queued events.
Passing an illegal address as timeout will result in setting errno to EFAULT only if detected by the application process.
SunOS 5.10 4 Oct 2004 aiowait(3AIO)