home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 284 
 Maurice Kinal to Tony Langdon 
 Testing 
 27 Apr 16 15:33:37 
 
-={ Thursday, 28 April 2016, 01:33:37.560060883 +1000 }=-

Hey Tony!

 TL> mainly to discuss a project with Maurice.

Sounds great.  How about trying this just to get us started out;

-------------- test raw pkt processing start
start_regexp="[0-9]{2} [[:alpha:]]{3} [0-9]{2}  [0-9]{2}:[0-9]{2}:[0-9]{2}\x00"

tr '\n' '\37' < raw.pkt | sed -r "s/${start_regexp}/\n&/g" | \
  sed -r -n "/^${start_regexp}/ p" | \
  gawk -F'\0' 'BEGIN { OFS = "\0" } { print $1, $2, $3, $4, $5 }' | \
temp.msg
-------------- test raw pkt processing end

The start_regexp variable is the ftn datetime stamp and I am using that as the
start of the message.  'tr' should replace any fake linefeeds with unit
seperators to keep offsets the same.  The first sed call places a linefeed in
front of all start_regexp it finds and then the second sed prints all the
lines that start with a start_regexp. gawk prints out the resulting null
each line (can eliminate this step if that information is wanted/needed).  The
end result should be a file with each line contatining exactly one message,
null delimited fields.  'wc -l < temp.msg' will yield exactly how many
messages are in that file.

I think this is a great place to start and I'd appreciate any input about the
format of temp.data as well as anything that needs troubleshooting, especially
sed which can and does vary across different systems.

Life is good,
Maurice

... Don't cry for me I have vi.
--- GNU bash, version 4.3.42(1)-release (x86_64-atom-linux-gnu)
 * Origin: Little Mikey's Brain - Ladysmith BC, Canada (1:153/7001.0)

<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca