Hey folks, quick update as promised elsewhere (plus easier this way):
Yes the website was taken down. Long story short, a bad presence
here that I simply cant work with anymore, too much drama.
Here's something, in over 3 hours time, 52 of you did visit & 13
downloaded the mHash() draft, which I thought was nifty, appreciate it.
Nah dbj2 is not an issue, I was moving so quickly I simply did not consider
choosing another name for the function. A knuckle-headed oversite when you
consider I did the same thing a few days prior when I wrote a function named
ord(). Trust me, a very humbling snafu to have done so publicly twice in a
week's time.
I use ZOC: https://www.emtec.com/zoc/index.html
No not going anywhere, but life often seeks its own level, its all good. =)
Yep, mHash will be available again, but this time only via email. Any how,
let's check it out (sorry if its too terse)...
First the new function signature: mHash(str, key, hash, x, y, ascii)
Example usage: hash = mHash(my_input, my_key)
Example csv file (we'll choose sally, her hash is
the number directly below in the same column):
# jenny, sally, wendy
4044119583, 156734252, 0782926302
apple, she, pear
these, knows, another
fubar, how, blurb
Example commandline invocation:
awk -vNAME=sally -vKEY=2147483647 -f script.awk data.csv
Example script, we'll constrain processing *exclusively* to sally's column
BEGIN {
FS = "," # set field separator to comma
UNLOCK = 0 # when > 0, column is 'unlocked'
HASH = mHash(NAME, KEY) # initialize hash & lets go...
}
NR == 3 { # start @ 3rd line
for (x = 1; x <= NF; x++) {
if ($x ~ HASH) {
UNLOCK = x;
break;
}
}
}
NR > 3 && UNLOCK {print $UNLOCK} # if unlocked, print only sally's column
# eof
Hey, thanks again!
--
:wq
Mike Sanders