Thanks - an interesting suggestion, especially as I wasn't aware of
having any gawk-specific code.
However, a quick test using "gawk -c" for compatibility mode immediately >throws up 'strftime' as being a gawk extension, and as the whole script
is based heavily around checking formatted dates it looks as if I do
need gawk in particular. Which is worth knowing anyhow...
In article <20220726094300.910641200F1@fleegle.mixmin.net>,
Igenlode Wordsmith <Use-Author-Supplied-Address-Header@[127.1]> wrote:
...
Thanks - an interesting suggestion, especially as I wasn't aware of
having any gawk-specific code.
However, a quick test using "gawk -c" for compatibility mode immediately >>throws up 'strftime' as being a gawk extension, and as the whole script
is based heavily around checking formatted dates it looks as if I do
need gawk in particular. Which is worth knowing anyhow...
Interestingly enough, I just tested busybox AWK on Linux, and it has strftime(). Color me both surprised and impressed. In fact, though I
expected it to be pretty easy to find something that broke it, I was unable to do it (in a very short/quick session of playing with it).
So, I'd give it a try.
P.S. I wouldn't be all that surprised if the AWK in busybox *was* (more or less) gawk. Like, where else would they look?
On 2022-07-26, Kenny McCormack <gazelle@shell.xmission.com> wrote:
In article <20220726094300.910641200F1@fleegle.mixmin.net>,
Igenlode Wordsmith <Use-Author-Supplied-Address-Header@[127.1]> wrote:
...
Thanks - an interesting suggestion, especially as I wasn't aware of >>>having any gawk-specific code.
However, a quick test using "gawk -c" for compatibility mode immediately >>>throws up 'strftime' as being a gawk extension, and as the whole script >>>is based heavily around checking formatted dates it looks as if I do
need gawk in particular. Which is worth knowing anyhow...
Interestingly enough, I just tested busybox AWK on Linux, and it has
strftime(). Color me both surprised and impressed. In fact, though I
Why; this is a a standard C library function dating back to ANSI C 89
(and beyond) with a fixed arity. Wrapping it in a programming language >interpreter that already wraps other library functions should about a 30 >minute job, including documentation (which would just point the user
to the manual for strftime for the format codes).
The Awk in BusyBox is definitely not Gawk; and that sort of inclusion
would defeat the whole point of BusyBox.
The point of BusyBox is providing common utilities in a small space,
mainly for embedded systems. BusyBox compiles all the utilities into
a single executable.
Here is BusyBox on one Arm-based embedded system I'm working with:
# ls -l /bin/busybox.nosuid
-rwxrwxr-x 1 1000 1000 1052020 Jul 22 23:36 /bin/busybox.nosuid
It's about a megabyte, which contains all the utilities BusyBox
provides, including the shell and Awk.
GNU Awk alone would probably take up something like 80% of that size.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 793 |
Nodes: | 10 (1 / 9) |
Uptime: | 37:48:26 |
Calls: | 11,106 |
Calls today: | 3 |
Files: | 186,086 |
Messages: | 1,751,429 |