MSGID: 1:153/7001.0 5829637b
-={ 2016-11-14 07:10:51.532988656+00:00 }=-
Hey Nicholas!
Please find below the oneliner for type 2 pkt headers gleemed from fts-0001.016
which makes it well documented.
---------- ye olde gpm cut n' paste starts
# generate Type 2 pktHeader
PKT_DATE=( $(date +"%Y %-m %-d %-H %-M %-S" | \
awk 'BEGIN { OFS = "," } {print $1, $2-1, $3, $4, $5, $6}') )
echo -e
"$origNode,$destNode,${PKT_DATE[@]},0,2,$origNet,$destNet,0,0,,$origZone,$destZ
one," | \
perl -e 'while(){@myarray = split(/,/, $_);};\
print pack("S12C2a8S2a20", @myarray);' > $OUTPKT
---------- ye olde gpm cut n' paste ends
Note the additional awk call which fixes the month silliness (ie 0-11). Same
will have to happen in type 2+ headers although it could have been taken care
of within the perl part as it has a builtin function for that particular
peculiarity. However I prefer the awk call and when I originally wrote that
call was thinking I might use gawk for fidonetting more.
Anyhow I am glad to see type 2 pkt headers working again. I am going to leave
the type 2.2 links as is for now as I think that is a better type especially
for nodes that cannot do datetime stamps.
Time for bed. I earned it methinks.
Life is good,
Maurice
... ðone wisdom ðe ðe God sealde ðær ðær ðu hiene befæstan mæge,
befæste.
Wherever you can use the wisdom God gave you, use it.
--- GNU bash, version 4.4.0(1)-release (x86_64-atom-linux-gnu)
* Origin: Little Mikey's Brain - Ladysmith BC, Canada (1:153/7001.0)
|