-={ Thursday, June 04 2015, 10:47:13 -0700 }=-
Hey All!
Given;
origAddr="1:11/111.0"; destAddr="2:22/222.0"
then this should work - or at least does with the version of bash here;
read origZone origNet origNode origPoint <<< \
$(echo $origAddr | tr ':/.' ' ')
and
read destZone destNet destNode destPoint <<< \
$(echo $destAddr | tr ':/.' ' ')
which might be better done using bash's built in string functions instead. At
the moment I am using the above divide and conquer strategy but am definetly
open to better methods if and when they present themselves.
Of course the reason for splitting addresses is due to the seriously flawed ftn
addressing scheme of yore which (of course) should have never happened but did
and some silly person(s) decided to call a standard and then tack on a
'backwards' in front of 'standards' to ensure it's continued lameness. Tsk,
tsk. Very sad indeed. :::evil grin:::
Anyhow, there it is and is a good start to 'fix' what happens later on due to
the obviously flawed nature of ftn network addressing.
Life is good,
Maurice
... Don't cry for me I have vi..
--- GNU bash, version 4.3.33(1)-release (x86_64-atom-linux-gnu)
* Origin: Pointy Stick Society - Ladysmith BC, Canada (1:153/7001.0)
|