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
mailq(1) General Commands Manual mailq(1)
NAME
mailq - Displays the contents of the mail queue
SYNOPSIS
mailq [-v]
DESCRIPTION
The mailq command displays a list of messages in the mail queue. The mailq command is the same as the sendmail command with the -bp
option; see sendmail for more information.
EXAMPLES
The mailq command lists the mail queue as shown in the following example: Mail Queue (1 request) --QID--- -Size- ---Q-
Time------- --Sender/Recipient--- AA002508 3 Thu Dec 17 10:01 root The mailq -v command lists the mail queue as shown in the
following example: Mail Queue (1 request) --QID--- -Size- -Priority- ---Q-Time---- -Sender/Recipient- AA002508
3 1005 Dec 17 10:01 root
(Output might be formatted differently on your system.)
The fields have the following meaning: Contains the message queue ID of the message. Contains the number of bytes in the body of
the message (header information not included). Contains the priority of the message. Contains the date that the message entered
the queue. Contains the user ID of the sender (first), and then the user ID of the receiver of the message. In this example, a
message also indicates the status of the message.
FILES
Contains the log file and temporary files associated with the messages in the mail queue.
SEE ALSO
Commands: sendmail(8)
mailq(1)