It could be as simple as quoting your search string:-
It's an odd search string though. From the man page I have on RHEL 6.1, I have:-
So that you mean that you are looking for a record that starts (doesn't have to be at the beginning of the line) with an S, then the H is optional and then I get confused.
Are you trying to use the ? as a single character each time?
I would think a better search string would be more like:-
to represent Start of line, SH, then any 3 characters, then US. The remainder of the line can be ignored.
Do either of these meet your needs?
Robin
Liverpool/Blackburn
UK
Last edited by rbatte1; 06-25-2013 at 10:59 AM..
Reason: Grammar
Hello everyone,
I have been trying to get a list of all files containing a line of this type:
};#followed by anything
with any spaces (0 or more or 0 or more tabs) before the } and between each of the characters.
I have been trying this :
grep '*}*;*#*' *.c
but I have not been fully... (1 Reply)
Hi
Is there any way GREP command can return word and not complete line.
My file has following data:
Hello Everyone I am NitinrajSrivastava
Hi Friends Welcome VrajSrivastava
I am using grep 'raj' which is returning me complete line.However I want only the word having keyword 'raj'.
Required... (11 Replies)
Hi
I am facing the below problem.
I have set of lines in which i have to search for only the line which matches with the pattren "/" only.
input:-
/*+ some text */
/*+ some text */
/* Remove rows from a table of survey results. */
/* Add a survey respondent's name and answers. */
/*... (7 Replies)
Hi,
I am trying to do pattern search using grep command. But i donot know what mistake i'm doing. I am not getting the expected Result. could any one please help me out?
$ cat b.ksh
AasdjfhB
57834B
86234B
472346B
I want to print the line which is starting with either A or 8 and... (10 Replies)
Hello,
I have a bunch of zip files like
SS_SAMPLE_101_123.zip
SS_101_123.zip
SS_SAMPLE_121_345.zip
SS_SAMPLE_222_678.zip
SS_123_890.zip
SS_.zip
The 'ls' should search and list the files such as SS_101_123.zip and SS_123_890.zip alone. Could you please guide me with this.... (5 Replies)
I 'm writing a script to search particular strings from log files. The log file contains lines start with *. The file may contain many other lines start with *. I need to search a particular line from my log file. The grep command is working in command line , but when i run my script, Its printing... (7 Replies)
One more question:
I want to grep "COS_12_TM_4 pattern from a file look likes :
"COS_12_TM_4" " ];I am taking scan_out as the input from the user.
How to search "COS_12_TM_4" in the file which is corresponds to scan_out (12 Replies)
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
LEARN ABOUT NETBSD
pcq_get
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