Hello all,
I'm trying to accomplish that if a file gets written to folder /path/to/a/ it gets automatically copied into /path/to/b/ the moment its get written.
I thought of writing a shell script and cron it that every X amount of minutes it copies these files over but this will not help me... (2 Replies)
Hello Friends,
I want to merge two files in ascending order on the first field. And if the first field matches sort on 3rd field i.e, TXADDR should come ahead of RXADDR .
file1
9 : TXADDR : 00000000
65 : TXDATA 0000000000000011
83 : TXDATA 0000000000000012
453 :... (10 Replies)
Hi all:
I have a problem with a C++ service runing on solaris 10. This service only set a signal on oracle table. When the service detect a cut off on the line (tcp/ip), trigger a cobol program for set the signal OFF. When the line is on again, the service trigger the same cobol program for set... (0 Replies)
Hi all,
I have copied all my files to one folder.and i want to check how many files (count) in the folder recently moved or total files in my folder?
please send me the query asap. (3 Replies)
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Hi,
I had a folder ABC . Was trying to move it . But the command was randomly stopped by mistake. Now , I have folder ABC in 2 location with different half data at each path . How do I merge both the folders and sub folders into a single one ?
Any help is appreciated. (2 Replies)
Dear Friends,
I am looking for a shell script to merge input files into one file .. here is my idea:
1st paramter would be outfile file (all input files content)
read all input files and merge them to input param 1
ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
I need help to write shell script to copy files from one server to another server.
Source Directory UAE(inside i have another folder Misc with files inside UAE folder).I have to copy this to another server UAE folder( Files should be copied to UAE folder and Misc files should be copied in target... (3 Replies)
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 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