I need a clarification on one of the scripts that i have written, I new to file handling and i need help:
I am trying to find a particular pattern in a file "****** PBX" in set of 5 files named:
xy.cc3
xv.cc3
xx.cc3
xr.cc3
xd.cc3
in a directory. If i find the files starting with these... (16 Replies)
Hello,
If I run a program from within shell, the output is displayed in the command line terminal. Is there a way I can capture that output and choose only the very last string in it to send it to a new file?
Thank you (6 Replies)
Hi,
I wanted to know how i could accomplish this in a script using ksh.
Lets say there is a file called test.dat and it has a certain input like below :
.
.
Hi = 56
Hi = 67
.
.
1 record(s) selected
Now i need to capture the numbers after the = sign and store them in a... (3 Replies)
I have a script which I call and pass a text string to it. This string is then is assigned to a variable in the script. I then call another script and pass that variable to the second script, but when I do, the quotes are lost and the second script gets a total of three variables 'my', 'lovely' and... (3 Replies)
Hi i have a command in windows which captures the filenames with the same pattern and route it to another file.
for example filetest_20110921, filetest_20110922,filetest_20110923 etc
I would like to know the command in UNIX/LINUX for the same. The command which i am using in Windows is
... (12 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 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)
Dear All
From below mention input file I want op file as mention. Kindly help.
IP file:
"BSCGNR4_IPA17_C" 329 140119 0717 RXOCF-105 KJO001_BASC_NG AC FAULTY DG ON DOOR OPEN
Needed OP:
140119 0717 KJO001_BASC_NG AC FAULTY DG ON DOOR OPEN
Note that string mark in red as variable in... (3 Replies)
Dear all,
I have a log file to be analysed. this log file contains vaiours lines of code starting with date timestamp.
if my search string is exception then that resepective log statement starting from the date is required.
example:
2014/10/01 16:14:44.459|>=|E|X|19202496|2832|... (5 Replies)
I have a comma separated file which contains data like;
File header:
ID_WVR,SAK_WVR_SVC,DSC_WVR_WVC,SAK_PROCEDURE,CODES,CDE_PROC_MOD ,CDE_PROC_MOD_2 ,CDE_PROC_MOD_3
File Detail:
AMR,5100,Total Services,305,D0120,,,
AMR,5101,Periodic Services,40702,H2011,U1,,
AMR,5112,Day... (4 Replies)
Discussion started by: jnrohit2k
4 Replies
LEARN ABOUT NETBSD
selrecord
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