09-25-2010
Quote:
Originally Posted by
leonmerc
[...] I have so far:
grep "^[WERTYPASGHJKLZXCVBNM][1-9][WERTYPASGHJKLZXCVBNM]{1-9,:space:1-9}[WERTYPASGHJKLZXCVBNM][1-9]" address.txt
The red part being the wrong part, could anyone help? thank you so much.
grep
-E "^[WERTYPASGHJKLZXCVBNM][1-9][WERTYPASGHJKLZXCVBNM]
[[:space:]]?[1-9][WERTYPASGHJKLZXCVBNM][1-9]" address.txt
You were going well. The [[:space:]] can be substituted for just a literal space or a [ ] in your case.
Last edited by Aia; 09-25-2010 at 11:43 PM..
This User Gave Thanks to Aia For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can
grep G.*schema
give me the result: ${Gacntg_dt}""'"'
doesn't G.*schema say give me an unlimited number of characters between G and schema?
:confused: (3 Replies)
Discussion started by: danmauer
3 Replies
2. UNIX for Dummies Questions & Answers
I'm hoping that there is a way to do this. I'm sure I won't be able to get the answer I need on the deadline I need it...but at least I'll learn how to solve this problem.
I have a file that looks like this:
(00:14:25\$ head -27 QNHDSPACEDVR
Name: PollDhctAVFSInfo 00:0F:21:4B:00:6A
Name:... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
3. Shell Programming and Scripting
field 12345 12345
field 12345
field 12345 123456
last fleld (from three) is optional, but if it occures It has to be composed only of nummbers and maximum 5 positions long.
If I use:
grep "^field \{5\}"
I get:
field 12345 12345
field 12345
field 12345 123456
But I wont... (11 Replies)
Discussion started by: necroman08
11 Replies
4. Shell Programming and Scripting
Hi,
I want to know how to grep space.
Eg: input file contains
1565432 432 546
3514432 432 545
6541332 432 354
5464412 565 355
8456145 546 534
5632465 432 654
From this i need output of the lines which has 432 which are bold.
My requirement is whenever 432 comes... (3 Replies)
Discussion started by: rakeshbharadwaj
3 Replies
5. Shell Programming and Scripting
Hi,
I'm currently working on a shell script to automate a backup check on oracle database. My requirement is to grep the words between two delimiters and pass on to a variable..
for ex I have following values in my log file...
(DB_NAME), (163.24 25), (16/02/10 23:40), (COMPLETED),
I want... (5 Replies)
Discussion started by: senthil3d
5 Replies
6. UNIX for Dummies Questions & Answers
This is probably common knowledge, but I am a beginner at bioinformatics!
I want a list of my sequence names, without sequence or any of the free text after the space. This is some example file:
>cow|68989024|dbj|AB107582.1| Uncultured bacterium gene for 16S rRNA, partial se
quence, clone:... (7 Replies)
Discussion started by: kkohl78
7 Replies
7. Shell Programming and Scripting
Input:
qwertmyuiop
It should print "m".
What's the command to do this with sed? (6 Replies)
Discussion started by: cola
6 Replies
8. Shell Programming and Scripting
Hi all ,
I'm new to unix
I have a checked project , there exists a file called xxx.config .
now my task is to find all the files in the checked out project which references to this xxx.config file.
how do i use grep or find command . (2 Replies)
Discussion started by: Gangam
2 Replies
9. Shell Programming and Scripting
I'm doing some integrity checeking. I Have found if the file contains an "invalid" entry (Zipcode +4). What I'm looking to do is modify the data so that it's just the 5 digit zipcode. I found a couple of helpful posts, but nothing that I could apply to my situation.
Here's a sample input (note... (6 Replies)
Discussion started by: defjab
6 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies
bhm(8) Postal bhm(8)
NAME
bhm - program to send SMTP mail to /dev/null
SYNOPSIS
bhm [-m maximum-message-size] [-t threads] [-p listen-port] [ -s ] [-a] [-[z|Z] debug-file] [-r reverse-dns] user-list-filename
DESCRIPTION
This manual page documents briefly the bhm, program.
It is designed to test the performance of SMTP relay servers by receiving mail to /dev/null at random speeds.
The user-list-filename is the name of a file which contains a list of valid user's email addresses. The file may have three fields sepa-
rated by spaces, the email address, the password (used for rabid) and an optional third field to specify what is to be done with the mail.
A 'd' character means that it is to be deferred (SMTP 45x), a 'r' means that it is to be rejected (SMTP 55x), a 'b' means that it is to be
accepted and bounced, and a 'g' means that it is to be grey-listed.
The reverse-dns file is in the same format as /etc/hosts and gives the value that will be used in the 220 message. Otherwise it will be
bhm
The maximum-message-size indicates the size in Kilobytes that will be the maximum size of a message that will be accepted. The default is
10240k.
The -s parameter enables SSL.
The listen-port parameter specifies the TCP port to listen on (default 25).
The threads parameter is the number of threads that may be created to receive mail. Note that your BHM machine may have hardware and OS
limits that determine how many connections it may receive.
The -a command turns on all logging. All message data received will be logged. This will make it slow and it may not be able to saturate
a fast Ethernet link...
The -z switch allows you to specify a debugging file base. From this base one file is created for each thread (with a ':' and the thread
number appended), each file is used to log all IO performed by that thread for debugging purposes.
The -Z switch is the same but creates a separate file for each connection as well with an attitional ':' appended followed by the connec-
tion number.
RETURN CODES
0 No Error
1 Bad Parameters
2 System Error, lack of memory or some other resource
AUTHOR
This program, it's manual page, and the Debian package were written by Russell Coker <russell@coker.com.au>.
AVAILABILITY
The source is available from http://doc.coker.com.au/projects/postal/ .
See http://etbe.coker.com.au/category/benchmark for further information.
SEE ALSO
postal(8),postal-list(8),rabid(8)
russell@coker.com.au 0.70 bhm(8)