Other than looping or using awk, perl, or python, I have no other idea except an extreme hack like this:
If you are running this against a large file it will waste considerable resources.
It wastes resources anyway, because it reads thru the file several times.
Hi
i need to print pathname in which the string present using 'find' command
sample output like this
Pathname String to be searched
---------- --------------------
/usr/test/myfile get
/opt/test/somefile get
Thanks in... (4 Replies)
hey to everybody
this is my first post at this forum
I need a very immediate answer for this question. If you can, I will be delightfull
I have a file called example.txt and I want to seek for the for hello and learn the number of the occurance of hello (2 Replies)
HI please let me know if there is any command to search and replace only the last occurence of a string in aline.
Eg:
" This cat is a cat with a tail longer of all cat."
I need to replace only the last "cat" in the above line.
thanks (3 Replies)
What's the easiest way to search a file for a specific string and then look for other instances after that? I want to search for all Virtual Hosts and print out the Server Name and Document Root (if it has that info), while discarding the rest of the info.
Basically my file looks like this:
...... (6 Replies)
Please help me, wasted hrs:wall:, to find this soulution:-
I need a command that will work on file (xml) and replace multiple occurrence (more than 2 times)
Examples
1. '==='
2. '===='
3. '======='
should be replaced by just '=='
Note :- single character should be replaced. (=... (13 Replies)
I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported
Input file is a free flowing file without any format
example of output
ERR-00001=5
....
ERR-01010=10
.....
ERR-99999=10 (4 Replies)
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
I have two files
1. input.txt
2. keyword.txt
input.txt has contents like
.src_ref 0 "call.s" 24 first
0x000000 0x5a80 0x0060 BRA.l 0x60
.src_ref 0 "call.s" 30 first
0x000002 0x1bc5 RETI
.src_ref 0 "call.s" 31 first
0x000003 0x6840 ... (2 Replies)
Hi,
How can I use find command to search string/pattern in a file recursively?
What I tried:
find . -type f -exec cat {} | grep "make" \;
Output:
grep: find: ;: No such file or directory
missing argument to `-exec'
And this:
find . -type f -exec cat {} \; -exec grep "make" {} \;... (12 Replies)
Discussion started by: cola
12 Replies
LEARN ABOUT SUNOS
rsm_intr_signal_post
rsm_intr_signal_post(3RSM) Remote Shared Memory Library Functions rsm_intr_signal_post(3RSM)NAME
rsm_intr_signal_post, rsm_intr_signal_wait - signal or wait for an event
SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ]
#include <rsmapi.h>
int rsm_intr_signal_post(void *memseg, uint_t flags);
int rsm_intr_signal_wait(void *memseg, int timeout);
DESCRIPTION
The rsm_intr_signal_post() and rsm_intr_signal_wait() functions are event functions that allow synchronization between importer processes
and exporter processes. A process may block to wait for an event occurance by calling rsm_intr_signal_wait(). A process can signal a wait-
ing process when an event occurs by calling rsm_intr_signal_post().
The rsm_intr_signal_post() function signals an event occurance. Either an import segment handle (rsm_memseg_import_handle_t) or an export
segment handle (rsm_memseg_export_handle_t) may be type cast to a void pointer for the memseg argument. If memseg refers to an import han-
dle, the exporting process is signalled. If memseg refers to an export handle, all importers of that segment are signalled. The flags argu-
ment may be set to RSM_SIGPOST_NO_ACCUMULATE; this will cause this event to be discarded if an event is already pending for the target seg-
ment.
The rsm_intr_signal_wait() function allows a process to block and wait for an event occurance. Either an import segment handle (rsm_mem-
seg_import_handle_t) or an export segment handle (rsm_memseg_export_handle_t) may be type cast to a void pointer for the memseg argument.
The process blocks for up to timeout milliseconds for an event to occur; if the timeout value is -1, the process blocks until an event
occurs or until interrupted.
RETURN VALUES
Upon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error.
ERRORS
The rsm_intr_signal_post() and rsm_intr_signal_wait() functions can return the following error:
RSMERR_BAD_SEG_HNDL Invalid segment handle.
The rsm_intr_signal_post() function can return the following error:
RSMERR_CONN_ABORTED Connection aborted.
RSMERR_REMOTE_NODE_UNREACHABL Remote node not reachable.
The rsm_intr_signal_wait() function can return the following errors:
RSMERR_INTERRUPTED Wait interrupted.
RSMERR_TIMEOUT Timer expired.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO rsm_memseg_get_pollfd(3RSM), attributes(5)SunOS 5.10 7 Nov 2002 rsm_intr_signal_post(3RSM)