08-22-2012
grep words from txt
HTML Code:
Queue [APSAUTOCODER] on node [PRODAPP1] in domain [PROD]
description :
type : local
max message len : 104857600
max queue depth : 5000
queue depth max event : enabled
persistent msgs : yes
backout threshold : 0
msg delivery seq : priority
queue shareable : yes
open input count : 1
open output count : 11
current queue depth : 0
queue depth high limit : 80
queue depth high event : enabled
queue depth low limit : 20
queue depth low event : disabled
message enq count : 60079
message deq count : 60082
inhibit gets : no
inhibit puts : no
creation date/time : Wed 11-Jan-2012 01:06:11 PM
alteration date/time : Tue 14-Aug-2012 12:40:32 PM
cluster name : PROD
Queue [APSCASERETRIEVAL] on node [PRODAPP1] in domain [PROD]
description :
type : local
max message len : 104857600
max queue depth : 5000
queue depth max event : enabled
persistent msgs : yes
backout threshold : 0
msg delivery seq : priority
queue shareable : yes
open input count : 1
open output count : 0
current queue depth : 0
queue depth high limit : 80
queue depth high event : enabled
queue depth low limit : 20
queue depth low event : disabled
message enq count : 261
message deq count : 262
inhibit gets : no
inhibit puts : no
creation date/time : Wed 11-Jan-2012 01:05:54 PM
alteration date/time : Thu 29-Mar-2012 09:43:52 AM
cluster name : PROD
Queue [BMDI.RESULTS] on node [PRODAPP1] in domain [PROD]
description :
type : local
max message len : 104857600
max queue depth : 8000
queue depth max event : enabled
persistent msgs : yes
backout threshold : 0
msg delivery seq : priority
queue shareable : yes
open input count : 1
open output count : 0
current queue depth : 0
queue depth high limit : 80
...... more ......
I have a txt file containing the lines above, and need to grep 2 of items (i.e. Queue [APSAUTOCODER] max queue depth : 5000) off of the file so that the output will look like:
HTML Code:
APSAUTOCODER - max queue depth : 5000
APSCASERETRIEVAL - max queue depth : 5000
BMDI.RESULTS - max queue depth : 8000
.... more ...
Please advise.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a .txt file which contains several lines of text. I need to write a script program using grep or any other unix tool so as to detect part of the text (words) between / / that begin with the symbol ~.
For example if somewhere in the text appears a webpage address like... (8 Replies)
Discussion started by: chrisxgr
8 Replies
2. UNIX for Dummies Questions & Answers
I have been trying to find files containing the words AAA, BBB and CCC.
I tried:
grep AAA `grep BBB files*` grep CCC files*
but is does not work
I tried several ways
this is an easy one but I am a dummy, Does anyone can help me?
Thanks
:( (12 Replies)
Discussion started by: murbina
12 Replies
3. Shell Programming and Scripting
How would I write a command(s) to read from a file (list) that looks like this: 29847374384 and grep from a second file (list) that looks like this: 29847374384, jkdfkjdf,3833,ddd:confused: (1 Reply)
Discussion started by: smellylizzard
1 Replies
4. Shell Programming and Scripting
Hi,
i will deal with txt file and i want to use perl to extract number of words from this txt
ex :if the txt file is a story which contains person names and iwant to extract these names and there is something else that these names which i want perl to extract must match the words (person names) ... (2 Replies)
Discussion started by: eng_shimaa
2 Replies
5. Shell Programming and Scripting
Hi
Please can you help me on this:
How to grep for multiple words in a file, BUT for every word found output it to a new line.
regards
FR (8 Replies)
Discussion started by: fretagi
8 Replies
6. UNIX for Dummies Questions & Answers
How do you negate a literal hyphen/dash in a regex? If it's the first character inside the brackets, then it is read literally.
But if you stick a caret to the left of it, to negate it, then it seems it is no longer read literally. Or whatever, it doesn't work.
Nor does escaping it seem to... (3 Replies)
Discussion started by: sudon't
3 Replies
7. UNIX for Dummies Questions & Answers
Hi!
I'm trying to figure out how to find words with X number of doubles, only. I'm searching a dictionary, (one word per line). For instance, if you want to find words containing only one pair of double letters, you could do something like this:
egrep '(.)\1' wordlist.txt |egrep -v '(.)\1.*(.)\2'... (3 Replies)
Discussion started by: sudon't
3 Replies
8. Shell Programming and Scripting
see I have a text like:
27-MAY 14:00 4 aaa 5.30 0.01
27-MAY 14:00 3 aaa 0.85 0.00
27-MAY 14:00 2 aaa 1.09 0.00
27-MAY 14:00 5 aaa 0.03 0.00
27-MAY 14:00... (3 Replies)
Discussion started by: netbanker
3 Replies
9. UNIX for Dummies Questions & Answers
hi guys,
I perform a sort of monitoring. I have a server running and with
tail -f | grep "Searchstring"I monitor the log-file for recent specific entries. This is ok and works fine.
Now, in addition I want to have my search results not posted into the shell but into a file. I tried:
tail... (3 Replies)
Discussion started by: LaUs3r
3 Replies
10. Shell Programming and Scripting
Hi dears
i have text file like this:
INPUT.txt
001_1_173 j nuh ]az
001_1_174 j ]esma. nuh ]/.xori
.
.
. and have another text
like this
TABLE.txt
j j
nuh word1... (6 Replies)
Discussion started by: alii
6 Replies
queue(9S) Data Structures for Drivers queue(9S)
NAME
queue - STREAMS queue structure
SYNOPSIS
#include <sys/stream.h>
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI)
DESCRIPTION
A STREAMS driver or module consists of two queue structures, one for upstream processing (read) and one for downstream processing
(write). This structure is the major building block of a stream. It contains pointers to the processing procedures, pointers to the next
and previous queues in the stream, flow control parameters, and a pointer defining the position of its messages on the STREAMS scheduler
list.
The queue structure is defined as type queue_t.
STRUCTURE MEMBERS
struct qinit*q_qinfo; /* module or driver entry points */
struct msgb*q_first; /* first message in queue */
struct msgb*q_last; /* last message in queue */
struct queue*q_next; /* next queue in stream */
struct queue*q_link; /* to next queue for scheduling*/
void *q_ptr; /* pointer to private data structure */
size_t q_count; /* approximate size of message queue */
uint_t q_flag; /* status of queue */
ssize_t q_minpsz; /* smallest packet accepted by QUEUE*/
ssize_t q_maxpsz; /*largest packet accepted by QUEUE */
size_t q_hiwat; /* high water mark */
size_t q_lowat; /* low water mark */
Valid flags are as follows:
QENAB Queue is already enabled to run.
QWANTR Someone wants to read queue.
QWANTW Someone wants to write to queue.
QFULL Queue is considered full.
QREADR This is the reader (first) queue.
QUSE This queue is in use (allocation).
QNOENB Do not enable queue by way of putq().
SEE ALSO
strqget(9F), strqset(9F), module_info(9S), msgb(9S), qinit(9S), streamtab(9S)
Writing Device Drivers
STREAMS Programming Guide
SunOS 5.10 12 Nov 1996 queue(9S)