Sponsored Content
Top Forums Shell Programming and Scripting Parsing a long string string problem for procmail Post 302553812 by cwiggler on Thursday 8th of September 2011 09:35:59 PM
Old 09-08-2011
Parsing a long string string problem for procmail

Hi everyone,

I am working on fetchmail + procmail to filter mails and I am having problem with parsing a long line in the body of the email.

Could anyone help me construct a reg exp for this string below. It needs to match exactly as this string.

GetRyt |KLdipManagerImpl::ConditionCalledCall: mib: number output failed


The body of the email is something like this.

|17:08:05.972|0x00000DD8|-1| GetRyt |KLdipManagerImpl::ConditionCalledCall: mib: number output failed
|17:08:05.972|0x00000DD8|-1| GetNow |KLdipManagerImplnt::CondCallall: mibs: numbered output failed in queue

Thank in advance.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed problem - replacement string should be same length as matching string.

Hi guys, I hope you can help me with my problem. I have a text file that contains lines like this: 78 ANGELO -809.05 79 ANGELO2 -5,000.06 I need to find all occurences of amounts that are negative and replace them with x's 78 ANGELO xxxxxxx 79... (4 Replies)
Discussion started by: amangeles
4 Replies

2. UNIX for Advanced & Expert Users

Long string

I have a long string in ASCII file of approx 60k bytes file size. I need to know 1.How many charcters are adjectly in string. export MAX_COL_SIZE=`awk "length>max{max=length}END{print max}" test.txt` this return file cann't open...can anyone advice why?? 2. How many 'TRX consist in my... (1 Reply)
Discussion started by: u263066
1 Replies

3. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

4. Programming

String too long to view in GDB

Hi All Sometimes when I debug my C++ code with GDB an I want to view the content of my string variables I use the command "p <name of variable>" . When strings are very long and their displayed content is truncated. Do you know a way to see the whole content of those? Thanks M (5 Replies)
Discussion started by: manustone
5 Replies

5. UNIX for Dummies Questions & Answers

finding string in very long file without newlines

What's the best way to find a string in a very long file without newlines in Unix? The standard utility I'm aware of for finding a string in a single file is grep, but for a long file without newlines, I think the output is just going to be the input. I suppose I could use sed to replace the... (5 Replies)
Discussion started by: aaronpoley
5 Replies

6. Shell Programming and Scripting

splitting long string into several lines?

I'm using a barcode scanner to grab ISBNs. Unfortunately, short of hitting "enter" each time (not easy while on a ladder), there's no good way to split it up. So I scanned it into a series of long lines in notepad. Now, I need to split each line into 12-number lines. instead of:... (4 Replies)
Discussion started by: mbourgon
4 Replies

7. Shell Programming and Scripting

Problem in comparing 2 files string by string

Hi Champs, I am a newbie to unix world, and I am trying to built a script which seems to be far tough to be done alone by me..... " I am having a raw csv file which contains around 50 fields..." From that file I have to grep 2 fields "A" and "B"....field "A" is to be aligned vertically... (11 Replies)
Discussion started by: jitendra.pat04
11 Replies

8. Shell Programming and Scripting

sed or awk command to replace a string pattern with another string based on position of this string

here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb cat dump.sql INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies

9. Shell Programming and Scripting

Inserting into long delimited string using perl.

Hi, I have a very long pipe delimited string. The length of the string could vary. For example: START|one|two|three|four|five|six|seven START|one|two|three|four|five|six|seven|eight|nine START|one|two|three|four I want to replace in the third occurence of string with another... (9 Replies)
Discussion started by: som.nitk
9 Replies

10. Shell Programming and Scripting

Inserting a long string (readable in sed)

Hi everyone, I am trying to insert a single very long string as the first line of a file, So the following sed commands does what I want; sed '1i\"","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"' file.txt Think that all the... (3 Replies)
Discussion started by: hayreter
3 Replies
MAILFILTER(1)							   User Manuals 						     MAILFILTER(1)

NAME
mailfilter - Filters e-mail, gets rid of spam SYNOPSIS
mailfilter [OPTION]... DESCRIPTION
Mailfilter is a very flexible utility to get rid of unwanted spam mails, before having to go through the trouble of downloading them into the local computer. It offers support for one or many POP accounts and is especially useful for dialup connections via modem, ISDN, etc. Mailfilter connects to any POP mail box and compares part of its content to a set of user defined filter rules. That way the spam gets deleted directly on the mail server. With Mailfilter you can define your own filters (rules) to determine which e-mails should be delivered and which are considered waste. Rules are Regular Expressions, so you can make use of familiar options from other mail delivery programs such as procmail(1) for example. RETURN VALUE
The mailfilter program normally returns 0 but -1 if an error occurs. However, if it has been invoked with the return-value command line switch, it gives back a positive integer in case there are messages on the POP server. Empty POP accounts would then result in a return value of 0. Using the switch, mailfilter can be embedded into a shell script more easily. CONFIGURATION
The behaviour of Mailfilter is controlled by command-line options and a configuration file. The program will not start without it. Example configurations can be looked up in the mailfilterex(5) man page, in the INSTALL document or inside the doc/ directory of the Mailfilter distribution. By default Mailfilter tries to read $HOME/.mailfilterrc to get all its settings from. This is the place where all changes should be made, unless it is explicitly specified otherwise. A comprehensive list of all supported options and keywords can be found in the mailfilterrc(5) man page. OPTIONS
-h, --help Display help information -L, --logfile=FILE Specify logfile location -M, --mailfilterrc=FILE Specify rcfile location -r, --return-value Enable additional return values -t, --test Simulate deletes -i, --ignore-time-stamps Ignore invalid Message-ID time stamps (Do not use unless you know better!) -v, --verbose=LEVEL Specify level of verbosity -V, --version Display version information SEE ALSO
mailfilterrc(5), mailfilterex(5), procmail(1), regex(7) COPYRIGHT
Copyright (C) 2000-2012 Andreas Bauer <baueran@gmail.com> This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. Mailfilter January 2009 MAILFILTER(1)
All times are GMT -4. The time now is 11:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy