Hey Anton!
AM> Sad, but I don't have much time and patience any more to spend
AM> nights and days tweaking software and trying to squeeze a little
AM> bit more from machine's heart and brain.
For me that is how it all started way back when (late 1980's) and never really
had any other use for a computer other than to hack it.
AM> FidoNet attractive -- it is sooooo old school. (%
I suppose.
AM> Strictly saying, reader is not really needed, but I can't imagine
AM> reading conferences any other way.
For the header this works for me;
IFS=$'\034' read -r DateTime To From Subject <<< \
$(sed -n "${1}p" ~/archives/new_messages.raw | \
gawk -F'\0' 'BEGIN { OFS = "\034" } { print $1, $2, $3, $4}')
While for the msg body this seems to work;
sed -n "${1}p" ~/archives/new_messages.raw | gawk -F'\0' '{print $5}' \
| tr '\1\r' '@\n'
Note that I replace the nulls with octal 034 (ascii field seperator) as it
causes much less grief than the ascii null in scripting. It is only temporary
for display and the original(s) in ~/archives/new_messages.raw retain the null
seperators which makes it easy to send to other nodes if needed. All that is
required is the binary crap which is all stripped out from the incoming pkt's.
All of that only serves as drag and should be considered as food for /dev/null
at the local level. Whoever origianlly thought that putting binary in text
msg's was a good idea should have been taken out back to the woodshed and shown
the evils of his/her ways. What a total waste of bytes and processing to
erradicate them from a proper text message.
AM> It is very satisfying to build something from source code, spend
AM> time configuring it, and see it comes alive. (:
Agreed. I used to use htp when it first came out. Lean and mean.
Life is good,
Maurice
... Don't cry for me I have vi.
--- GNU bash, version 4.4.12(1)-release (x86_64-atom-linux-gnu)
* Origin: Little Mikey's Brain - Ladysmith BC, Canada (1:153/7001)
|