TIP: Click on subject to list as thread! ANSI
echo: tuxpower
to: Tony Langdon
from: Maurice Kinal
date: 2016-04-27 15:33:36
subject: Testing

-={ 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 }' | \
  sed 's/SEEN-BY:[[:print:]]*\x0d//g;s/\x01PATH:[[:print:]]*\x0d//g'
>> 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 delimited fields.  Finally the last sed call strips out SEEN-BY and
PATH from 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)
SEEN-BY: 123/500 138/146 140/1 153/802 7001 7715 154/10 203/0 221/0 1 6 360
SEEN-BY: 227/51 249/303 261/38 266/404 275/100 280/464 5003 288/34 320/119
SEEN-BY: 340/200 342/77 633/267 280 640/384 712/848 770/1
@PATH: 153/7001 7715 140/1 221/0 1 203/0 280/464 712/848 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.