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
OTHERQ(9F) Kernel Functions for Drivers OTHERQ(9F)
NAME
OTHERQ, otherq - get pointer to queue's partner queue
SYNOPSIS
#include <sys/stream.h>
#include <sys/ddi.h>
queue_t *OTHERQ(queue_t *q);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
q Pointer to the queue.
DESCRIPTION
The OTHERQ() function returns a pointer to the other of the two queue structures that make up a STREAMS module or driver. If q points to
the read queue the write queue will be returned, and vice versa.
RETURN VALUES
OTHERQ() returns a pointer to a queue's partner.
CONTEXT
OTHERQ() can be called from user or interrupt context.
EXAMPLES
Example 1: Setting Queues
This routine sets the minimum packet size, the maximum packet size, the high water mark, and the low water mark for the read and write
queues of a given module or driver. It is passed either one of the queues. This could be used if a module or driver wished to update its
queue parameters dynamically.
1 void
2 set_q_params(q, min, max, hi, lo)
3 queue_t *q;
4 short min;
5 short max;
6 ushort_t hi;
7 ushort_t lo;
8 {
9 q->q_minpsz = min;
10 q->q_maxpsz = max;
11 q->q_hiwat = hi;
12 q->q_lowat = lo;
13 OTHERQ(q)->q_minpsz = min;
14 OTHERQ(q)->q_maxpsz = max;
15 OTHERQ(q)->q_hiwat = hi;
16 OTHERQ(q)->q_lowat = lo;
17 }
SEE ALSO
Writing Device Drivers
STREAMS Programming Guide
SunOS 5.10 11 Apr 1991 OTHERQ(9F)