the file has several date fields.for example, #2, #3,and #5 are date fields.
I want grep year '2002' just within #2 field and get all the rows which content year '2002' in the #2 field. is it possible to do this? how to do it? Thanks (2 Replies)
Hi all,
I need to add a process to poll for the files using sftp during the specific time period .How to i add this to the exsiting script.
my requirement is to add a process to the below script which has to poll every 5 min from 5 A.M to 12 P.M. How do i do this?
... (1 Reply)
Hey guys, I'm fairly new at unix shell scripting and I have a quick question.
Quick overview I devolped a script where I generate a file ..and I want to grep any time greater than 30 minutes.
What i do is runa command to generates the below and puts it into a file:
I run
./ggsci << endit... (4 Replies)
Hello
I have a file with nearly 90000 lines in x,y,z format but have some lines that I do not need to show. Is there anyway to delete those 3 lines after every 288 lines.
Eg I keep the first 288 lines delete (289, 290 291); keep the next 288 lines after those and so on...
Thanks (6 Replies)
I need to grep all records from a file that has 1072 in 3rd column. 1072 can be prefixed by "SBC.", "CLS." or "DPT.". My search is just based on string 1072 in 3rd column. Delimiter in the file is tab. For example:
Input FIle:
"InvType" "Organization" "SBC.10720101" "CP.BUP.NY"
"InvType"... (4 Replies)
Hello,
I want to grep a specific process named "TEST" in AIX but not only is it showing what I want but also listing others that have the similar name. How can I only list "TEST"? I've tried using options grep -w with no change and grep -o isn't supported in my environment.
Please advise.
... (6 Replies)
Hello All
I have an input file with data below. I would like to grep and display the data where 3rd column contains string or at least one character. Kindly please help me with this!
Input:
tjfa3|zznpou|224fdd.34.ff3.35 |Tiv|Otj|1
fgduul7|zznikj| ... (7 Replies)
If I have a file like the following
abc.1
abc
abc_1
abc..1
abc*1
abc@1
abc def ghr
def......
ddef 5466 def ed
def** 123445
I`m trying to find exact words from the list
abc
def (4 Replies)
Discussion started by: ritakadm
4 Replies
LEARN ABOUT NETBSD
pcq_destroy
PCQ(9) BSD Kernel Developer's Manual PCQ(9)NAME
pcq -- producer/consumer queue
SYNOPSIS
#include <sys/pcq.h>
pcq_t *
pcq_create(size_t maxlen, km_flags_t kmflags);
void
pcq_destroy(pcq_t *pcq);
void *
pcq_get(pcq_t *pcq);
size_t
pcq_maxitems(pcq_t *pcq);
void *
pcq_peek(pcq_t *pcq);
bool
pcq_put(pcq_t *pcq, void *item);
DESCRIPTION
The machine-independent pcq interface provides lockless producer/consumer queues. A queue (pcq_t) allows multiple writers (producers), but
only a single reader (consumer). The consumer is expected to be protected by a lock that covers the structure that the pcq_t is embedded
into (e.g., socket lock, ifnet hwlock). These queues operate in a first-in, first-out (FIFO) manner. The act of inserting or removing an
item from a pcq_t does not modify the item in any way. pcq does not prevent an item from being inserted multiple times into a single pcq_t.
FUNCTIONS
pcq_create(maxlen, kmflags)
Create a queue that can store at most maxlen items at one time. kmflags should be either KM_SLEEP, if pcq_create() is allowed to
sleep until resources are available, or KM_NOSLEEP if it should return NULL immediately, if resources are unavailable.
pcq_destroy(pcq)
Free the resources held by pcq.
pcq_get(pcq)
Remove the next item to be consumed from the queue and return it. If the queue is empty, return NULL. The caller must prevent con-
current gets from occuring.
pcq_maxitems(pcq)
Return the maximum number of items that the queue can store at any one time.
pcq_peek(pcq)
Return the next item to be consumed from the queue but do not remove it from the queue. If the queue is empty, return NULL.
pcq_put(pcq, item)
Place an item at the end of the queue. If there is no room in the queue for the item, return false; otherwise, return true. The
item must not have the value of NULL.
CODE REFERENCES
The pcq interface is implemented within the file sys/kern/subr_pcq.c.
SEE ALSO atomic_ops(3), queue(9)HISTORY
The pcq interface first appeared in NetBSD 6.0.
BSD January 22, 2012 BSD