SILENT KILLERPanel

Current Path: > > usr > share > awk >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //usr/share/awk/

NameTypeSizeLast ModifiedActions
assert.awk File 383 bytes February 25 2018 17:17:35.
bits2str.awk File 334 bytes February 25 2018 17:17:35.
cliff_rand.awk File 307 bytes February 25 2018 17:17:35.
ctime.awk File 234 bytes February 25 2018 17:17:35.
ftrans.awk File 315 bytes February 25 2018 17:17:35.
getopt.awk File 2202 bytes February 25 2018 17:17:35.
gettime.awk File 2491 bytes February 25 2018 17:17:35.
group.awk File 1765 bytes April 18 2022 15:55:53.
have_mpfr.awk File 221 bytes February 25 2018 17:17:35.
inplace.awk File 1996 bytes February 25 2018 17:17:35.
intdiv0.awk File 462 bytes February 25 2018 17:17:35.
join.awk File 378 bytes February 25 2018 17:17:35.
libintl.awk File 238 bytes February 25 2018 17:17:35.
noassign.awk File 422 bytes February 25 2018 17:17:35.
ord.awk File 937 bytes February 25 2018 17:17:35.
passwd.awk File 1199 bytes April 18 2022 15:55:53.
processarray.awk File 355 bytes February 25 2018 17:17:35.
quicksort.awk File 1031 bytes February 25 2018 17:17:35.
readable.awk File 489 bytes February 25 2018 17:17:35.
readfile.awk File 267 bytes February 25 2018 17:17:35.
rewind.awk File 404 bytes February 25 2018 17:17:35.
round.awk File 661 bytes February 25 2018 17:17:35.
shellquote.awk File 472 bytes February 25 2018 17:17:35.
strtonum.awk File 1454 bytes February 25 2018 17:17:35.
walkarray.awk File 214 bytes February 25 2018 17:17:35.
zerofile.awk File 424 bytes February 25 2018 17:17:35.

Reading File: //usr/share/awk//strtonum.awk

# mystrtonum --- convert string to number

#
# Arnold Robbins, arnold@skeeve.com, Public Domain
# February, 2004
# Revised June, 2014

function mystrtonum(str,        ret, n, i, k, c)
{
    if (str ~ /^0[0-7]*$/) {
        # octal
        n = length(str)
        ret = 0
        for (i = 1; i <= n; i++) {
            c = substr(str, i, 1)
            # index() returns 0 if c not in string,
            # includes c == "0"
            k = index("1234567", c)

            ret = ret * 8 + k
        }
    } else if (str ~ /^0[xX][[:xdigit:]]+$/) {
        # hexadecimal
        str = substr(str, 3)    # lop off leading 0x
        n = length(str)
        ret = 0
        for (i = 1; i <= n; i++) {
            c = substr(str, i, 1)
            c = tolower(c)
            # index() returns 0 if c not in string,
            # includes c == "0"
            k = index("123456789abcdef", c)

            ret = ret * 16 + k
        }
    } else if (str ~ \
  /^[-+]?([0-9]+([.][0-9]*([Ee][0-9]+)?)?|([.][0-9]+([Ee][-+]?[0-9]+)?))$/) {
        # decimal number, possibly floating point
        ret = str + 0
    } else
        ret = "NOT-A-NUMBER"

    return ret
}

# BEGIN {     # gawk test harness
#     a[1] = "25"
#     a[2] = ".31"
#     a[3] = "0123"
#     a[4] = "0xdeadBEEF"
#     a[5] = "123.45"
#     a[6] = "1.e3"
#     a[7] = "1.32"
#     a[8] = "1.32E2"
#
#     for (i = 1; i in a; i++)
#         print a[i], strtonum(a[i]), mystrtonum(a[i])
# }

SILENT KILLER Tool