Closed malwaremuser closed 4 years ago
Why do you consider that better than awk? If it's the individual field names, we we do this:
function randhex() {
cat /dev/random | od --read-bytes=32 --width=32 -x | awk '{ for (i = 2; i <= 16; i++) { printf "%s", $i } printf "\n" }'
}
Yeah, that looks better -- it was more the long list of field names, which that for command fixes, and without starting multiple external commands. Sorry, daft idea -- scrap it.
How do you want to resolve this?
Hi Paul -- apologies for the delay. I was just trawling through github looking for something and remembered this. Yeah, just kill it. I'll close it.
I cringed when I saw your UNIX command line in the function randhex() (line 390) -- just fixed it up.
Granted, it is now less efficient as a result of starting multiple commands in place of awk(1), but given you're reading from /dev/random I suspect your efficiency is shot anyway.