Hi all,
I am looking for a coomand to search for the keywords in susequenct lines. Keyword1 in a line and Keyword2 in the very next line.
Once i found the combination ineed to print the lines with patterns and the line above and one below.
I am giving an example here: Keywords are :ERROR and... (12 Replies)
Hi I have 100 files in my directory.
Please help me how to do in Unix or any other scriptin lanuages.
I want to replace all occurances of "goutham" to goutham_ind ONLY if the file contains the word "goutham" with the word "engineer";
for eg----test1 is a file contains the following inf;
goutham... (6 Replies)
hello,
i 'd like your help about a bash script which:
1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel,
2.finds the link which leads to the download location of the Latest Stable Kernel version,
(the right link should lead to the file... (3 Replies)
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
Hello!
I'm trying to process a text file and am stuck at 2 extractions. Hoping someone can help me here:
1. Given a line in a text file and given a keyword, how can I extract the word preceeding the keyword using a shell command/script?
For example: Given a keyword "world" in the line: ... (2 Replies)
Hello,
I would like to change my setting in a file to the setting that user input.
For example, by default it is
ONBOOT=ON
When user key in "YES", it would be
ONBOOT=YES
--------------
This code only adds in the entire user input, but didn't replace it.
How do i go about... (5 Replies)
hi,
i need to replace all words in any quote position and then need to change the words inside the file thousand of raw.
textfile data :
"Ninguno","Confirma","JuicioABC"
"JuicioCOMP","Recurso","JuicioABC"
"JuicioDELL","Nulidad","Nosino"
"Solidade","JuicioEUR","Segundo"
need... (1 Reply)
Hi All,
I need one help to replace particular words in file based on if finds another words in that file .
i.e.
my self is peter@king.
i am staying at north sydney.
we all are peter@king.
How to replace peter to sham if it finds @king in any line of that file.
Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
LEARN ABOUT NETBSD
selinit
SELECT(9) BSD Kernel Developer's Manual SELECT(9)NAME
seldestroy, selinit, selrecord, selnotify -- select and poll subsystem
SYNOPSIS
#include <sys/param.h>
#include <sys/select.h>
void
seldestroy(struct selinfo *sip);
void
selinit(struct selinfo *sip);
void
selrecord(struct lwp *selector, struct selinfo *sip);
void
selnotify(struct selinfo *sip, int events, long knhint);
DESCRIPTION
selinit() and seldestroy() functions must be used to initialize and destroy the struct selinfo. The seldestroy() function may block.
selrecord() and selnotify() are used by device drivers to coordinate with the kernel implementation of select(2) and poll(2). Each object
that can be polled contains a selinfo record. Device drivers provide locking for the selinfo record.
selrecord() records that the calling thread is interested in events related to a given object. selrecord() should only be called when the
poll routine determines that the object is not ready for I/O: there are no events of interest pending. The check for pending I/O and call to
selrecord() must be atomic. Atomicity can be provided by holding the object's lock across the test and call to selrecord(). For non-MPSAFE
drivers, the global kernel_lock is enough to provide atomicity.
selnotify() is called by the underlying object handling code in order to notify any waiting threads that an event of interest has occurred.
The same lock held across the poll method and call to selrecord() must be held across the call to selnotify(). The lock prevents an event of
interest being signalled while a thread is in the process of recording its interest.
The events indicates which event happen. Zero may be used if unknown.
selnotify() also calls KNOTE() passing knhint as an argument.
CODE REFERENCES
The core of the select and poll subsystem implementation is in sys/kern/sys_select.c. Data structures and function prototypes are located in
sys/sys/select.h, sys/sys/poll.h and sys/sys/selinfo.h.
SEE ALSO poll(2), select(2), knote(9)BSD May 13, 2008 BSD