1. Each message starts with date
2. There is blank line between each message
3. Each message does not contain same number of lines.
Any help in merging multiple lines in each message to a single line is much appreciated.
AIX: Korn Shell
Error log file looks like below.
Code:
2012-04-17-14.19.13.003447 ZRC=0x800D002B=-2146631637=SQLM_RC_EVFULL "monitor full of data"
DIA8052C The Event Monitor "" has reached its file capacity. Delete
the files in the target directory "" or move them to another
directory.
2012-04-17-14.19.13.003798 ADM2017C The Event Monitor "DB2DETAILDEADLOCK" has reached its file capacity. Delete the files in the target directory "/db/db2cct2/cct2/db2cct2/NODE0000/SQL00001/db2event/db2detaildeadloc
k" or move them to another directory.
2012-04-17-14.19.13.642294
2012-04-17-13.59.56.765915
2012-04-17-11.14.12.503246 ADM5501I DB2 is performing lock escalation. The affected application
is named "db.8", and is associated with the workload name
"SYSDEFAULTUSERWORKLOAD" and application ID
"10.207.177.21.46719.120417111411" at member "8". The total number
of locks currently held is "403", and the target number of locks to
hold is "201". The current statement being executed is "DELETE FROM
CC.DOWNLOAD where DNLD IN (select DNLD_ID from
CC.DOWNLOAD where file_id=3325) AND upd_ts >= current
timestamp - 1 days".
2012-04-17-11.14.12.504032 ADM5502W The escalation of "400" locks on table "CC.DOWNLOAD" to lock intent "X" was successful.
I have a case where, I need to look into a file.
Go to each line of the file, find the length of the line, if the length of the line is more than 75 chars, I need to split the line into multiple lines of 75chars max. If the length of the line is less than 75, we need not do anything.
So at the... (4 Replies)
Can any one give me the idea on replacing multiple blank lines with a single blank line?
Please conside it for a file having more than 100 number of characters.
Regards,
Siba (3 Replies)
I have a file that contains the following:
:@:176:@:4:@:name:@:file:@:this is
a summary:@:description can be
long but who knows
can even have <br> tags.:@:how to:@:type:@:18544:@:550:@:400:END:
:@:177:@:9:@:name:@:file:@:summary:@:this
will containg... (18 Replies)
Hi,
I've some files with the following data and i need to convert the lines between the separator ---, into a single line. I've tried with the paste cmd but my main problem is that the number of lines between the separator is not fix, it can very between 1-4 lines.
Input
---
2010-02-22... (4 Replies)
Hi,
I've some files with the following data and i need to convert the lines between the separator ---, into a single line. I've tried with the paste cmd but my main problem is that the number of lines between the separator is not fix, it can vary between 1-4 lines.
Input
---
2010-02-22... (8 Replies)
This is related to one of my previous post but now with a slight difference: I need the "Updated:" to be in one line as well as the "Information:" on one line as well. These are in multiple lines right now as seen below. These can have 2 or more lines that needs to be in one line.
System name:... (8 Replies)
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
I Want to merge multiple lines based on the 1st field and keep into single record.
SRC File:
AAA_POC_DB.TAB1
AAA_POC_DB.TAB2
AAA_POC_DB.TAB3
AAA_POC_DB.TAB4
BBB_POC_DB.TAB1
BBB_POC_DB.TAB2
CCC_POC_DB.TAB6
OUTPUT
-----------------
'AAA_POC_DB','TAB1','TAB2','TAB3','TAB4'... (10 Replies)
I have code as below
# create temporary table `temp4277`(key(waybill_no))
select waybill_no,concat_ws('',card_type,card_series_no) cardinfo
from rfid_temp_ticket where waybill_no='4277'
group by... (4 Replies)
Discussion started by: kaushik02018
4 Replies
LEARN ABOUT OPENSOLARIS
mbox
mbox(5) File Formats Manual mbox(5)NAME
mbox - file containing mail messages
INTRODUCTION
The most common format for storage of mail messages is mbox format. An mbox is a single file containing zero or more mail messages.
MESSAGE FORMAT
A message encoded in mbox format begins with a From_ line, continues with a series of non-From_ lines, and ends with a blank line. A From_
line means any line that begins with the characters F, r, o, m, space:
From god@heaven.af.mil Sat Jan 3 01:05:34 1996
Return-Path: <god@heaven.af.mil>
Delivered-To: djb@silverton.berkeley.edu
Date: 3 Jan 1996 01:05:34 -0000
From: God <god@heaven.af.mil>
To: djb@silverton.berkeley.edu (D. J. Bernstein)
How's that mail system project coming along?
The final line is a completely blank line (no spaces or tabs). Notice that blank lines may also appear elsewhere in the message.
The From_ line always looks like From envsender date moreinfo. envsender is one word, without spaces or tabs; it is usually the envelope
sender of the message. date is the delivery date of the message. It always contains exactly 24 characters in asctime format. moreinfo is
optional; it may contain arbitrary information.
Between the From_ line and the blank line is a message in RFC 822 format, as described in qmail-header(5), subject to >From quoting as
described below.
HOW A MESSAGE IS DELIVERED
Here is how a program appends a message to an mbox file.
It first creates a From_ line given the message's envelope sender and the current date. If the envelope sender is empty (i.e., if this is
a bounce message), the program uses MAILER-DAEMON instead. If the envelope sender contains spaces, tabs, or newlines, the program replaces
them with hyphens.
The program then copies the message, applying >From quoting to each line. >From quoting ensures that the resulting lines are not From_
lines: the program prepends a > to any From_ line, >From_ line, >>From_ line, >>>From_ line, etc.
Finally the program appends a blank line to the message. If the last line of the message was a partial line, it writes two newlines; oth-
erwise it writes one.
HOW A MESSAGE IS READ
A reader scans through an mbox file looking for From_ lines. Any From_ line marks the beginning of a message. The reader should not
attempt to take advantage of the fact that every From_ line (past the beginning of the file) is preceded by a blank line.
Once the reader finds a message, it extracts a (possibly corrupted) envelope sender and delivery date out of the From_ line. It then reads
until the next From_ line or end of file, whichever comes first. It strips off the final blank line and deletes the quoting of >From_
lines and >>From_ lines and so on. The result is an RFC 822 message.
COMMON MBOX VARIANTS
There are many variants of mbox format. The variant described above is mboxrd format, popularized by Rahul Dhesi in June 1995.
The original mboxo format quotes only From_ lines, not >From_ lines. As a result it is impossible to tell whether
From: djb@silverton.berkeley.edu (D. J. Bernstein)
To: god@heaven.af.mil
>From now through August I'll be doing beta testing.
Thanks for your interest.
was quoted in the original message. An mboxrd reader will always strip off the quoting.
mboxcl format is like mboxo format, but includes a Content-Length field with the number of bytes in the message. mboxcl2 format is like
mboxcl but has no >From quoting. These formats are used by SVR4 mailers. mboxcl2 cannot be read safely by mboxrd readers.
UNSPECIFIED DETAILS
There are many locking mechanisms for mbox files. qmail-local always uses flock on systems that have it, otherwise lockf.
The delivery date in a From_ line does not specify a time zone. qmail-local always creates the delivery date in GMT so that mbox files can
be safely transported from one time zone to another.
If the mtime on a nonempty mbox file is greater than the atime, the file has new mail. If the mtime is smaller than the atime, the new
mail has been read. If the atime equals the mtime, there is no way to tell whether the file has new mail, since qmail-local takes much
less than a second to run. One solution is for a mail reader to artificially set the atime to the mtime plus 1. Then the file has new
mail if and only if the atime is less than or equal to the mtime.
Some mail readers place Status fields in each message to indicate which messages have been read.
SEE ALSO maildir(5), qmail-header(5), qmail-local(8)mbox(5)