I've been trying to share a gawk script for doing some processing on a--- Synchronet 3.19c-Linux NewsLink 1.113
Web page with a friend - it is theoretically cross-platform portable,
but she runs Windows and I don't. (I don't even know which version of
Windows she has; presumably the latest, whichever that is?)
She is having trouble in installing gawk on her computer. It looks as if
she needs to download GnuWin32 (or Cygwin?), but the downloads linked at >https://downloads.sourceforge.net/project/gnuwin32/gawk/3.1.6-1/gawk-3.1.6-1-setup.exe
and
https://downloads.sourceforge.net/project/ezwinports/gdb-12.1-w32-bin.zip >simply fail (and failed for me too when I tested them).
How does one set about running gawk under Windows nowadays? All the >references at http://gnuwin32.sourceforge.net/install.html look
worryingly ancient, and I know next to nothing about Windows software >installation myself, while she is a self-admitted 'tech novice'.
--
Igenlode Visit the Ivory Tower http://ivory.ueuo.com/Tower/
* Usenet: Warning, may contain Nuts *
How does one set about running gawk under Windows nowadays?
How does one set about running gawk under Windows nowadays?
In article <20220725060702.AA9491200D9@fleegle.mixmin.net>,
Igenlode Wordsmith <Use-Author-Supplied-Address-Header@[127.1]> wrote:
...
How does one set about running gawk under Windows nowadays?
I recommend Cygwin, for a variety of reasons.
But you don't need to install all of Cygwin on the target machine. What I
do is to install Cygwin on my machine (actually, a Windows VM running under Linux), so that I have access to all of the bells and whistles of Cygwin,
but for the target machine, I just figure out what I need to put on their machine.
$ ldd gawk
will tell you which DLLs you need. I think it boils down to just:
1) gawk.exe
2) cygwin1.dll
3) cyggmp-10.dll
4) cygintl-8.dll
5) cygmpfr-6.dll
6) cygreadline7.dll
7) cygsigsegv-2.dll
Put all these files in a directory on the target machine that is in %PATH% (Windows-speak) and it should "just work".
Also, the system() function uses cmd.exe. What's more, if something
tries to exec "/bin/sh" "-c" "whatever", that gets rewritten to
"cmd.exe" "/c" "whatever": so that programs which implement system-like >functions using fork/exec or spawn aren't trying to execute a
nonexistent command interpreter.
How does one set about running gawk under Windows nowadays?
have no command line experience. However, those same people use
gawk applications at the PowerShell prompt with no problems.
The gnuwin32 version of gawk is ancient. Don't use it. Use the version
from ezwinports, which is what's supported under Windows by the GNU >developers.
Cygwin is an alternative; it provides the possibility of a POSIX-style >environment under Windows, including gawk, but is probably more than
you want.
Definitely more than I can ask her to take on in order to test out a
simple gawk script, I think! Although by the looks of it, attempting to
get gawk running under Windows at all is going to be more complicated
than I can really expect her to handle :-(
On Monday, 25 July 2022 at 07:07:04 UTC+1, Igenlode Wordsmith wrote:
How does one set about running gawk under Windows nowadays?
To use gawk on Windows with the minimum of fuss, try installing
gawk using the Scoop package manager (https://scoop.sh/).
Once you have scoop installed, which is a 5-minute job and requires
no administrator rights, "scoop install gawk" will have you up and
running straight away.
Igenlode Wordsmith <Use-Author-Supplied-Address-Header@[127.1]> wrote:
Definitely more than I can ask her to take on in order to test out a
simple gawk script, I think! Although by the looks of it, attempting to
get gawk running under Windows at all is going to be more complicated
than I can really expect her to handle :-(
If you don't need gawk specifically, one of the simpler options which
doesn't seem to need extra libraries installed is this BusyBox port:
https://frippery.org/busybox/
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...
How does one set about running gawk under Windows nowadays? All the references at http://gnuwin32.sourceforge.net/install.html look
worryingly ancient, and I know next to nothing about Windows software installation myself, while she is a self-admitted 'tech novice'.
El 25/07/2022 a las 0:47, Igenlode Wordsmith escribió:
How does one set about running gawk under Windows nowadays? All the
references at http://gnuwin32.sourceforge.net/install.html look
worryingly ancient, and I know next to nothing about Windows software
installation myself, while she is a self-admitted 'tech novice'.
I have my own 32bit Windows port of gawk-5.1.0. Ready to be used by
anybody else. Available at
http://mcollado.z15.es/xgawk/win32/
Just download gawk-5.1.0-win32-bin.zip, unpack it on c:\gnu, and put >c:\gnu\bin in the path. That's all.
The distribution archive contains all the required DLL libraries as well
as full documentation in HTML and PDF formats.
I have my own 32bit Windows port of gawk-5.1.0. Ready to be used by
anybody else. Available at
http://mcollado.z15.es/xgawk/win32/
Just download gawk-5.1.0-win32-bin.zip, unpack it on c:\gnu, and put >c:\gnu\bin in the path. That's all.
The distribution archive contains all the required DLL libraries as well
as full documentation in HTML and PDF formats.
Oops, sorry -- I meant to send this to the newsgroup, not directly to
Manuel (not least because my email is currently broken...)
On 27 Jul 2022 Manuel Collado wrote:
I have my own 32bit Windows port of gawk-5.1.0. Ready to be used by
anybody else. Available at
http://mcollado.z15.es/xgawk/win32/
Just download gawk-5.1.0-win32-bin.zip, unpack it on c:\gnu, and put
c:\gnu\bin in the path. That's all.
The distribution archive contains all the required DLL libraries as well
as full documentation in HTML and PDF formats.
She tried this, and got the error "The code execution cannot proceed
because libgmp-10.dll was not found" -- and indeed I can't find any such
file within the archive, so presumably it's a dependency that was unintentionally compiled into the distribution? :-(
I went to [1] and downloaded [2]. Unzipped [2], started a Windows
command shell, CD'd into the directory containing gawk.exe and ran the >command
.\gawk.exe --version
which worked first time. This was Windows 10.
[1] http://vkiefel.de/compiled-SW.html
[2] http://vkiefel.de/gawk-5.1.0-win32.zip
On 31 Jul 2022 Bruce Horrocks wrote:
I went to [1] and downloaded [2]. Unzipped [2], started a WindowsThanks for the suggestion, which I have (again!) forwarded onwards.
command shell, CD'd into the directory containing gawk.exe and ran the
command
.\gawk.exe --version
which worked first time. This was Windows 10.
[1] http://vkiefel.de/compiled-SW.html
[2] http://vkiefel.de/gawk-5.1.0-win32.zip
I'm a bit surprised by the small size of the 'gawk.exe' file here, since
the one in the other archive was 6 Mb -- would that be because it
*doesn't* have the Cygwin stuff compiled in with it, or is it an
indication that it expects to link to external libraries?
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 793 |
Nodes: | 10 (1 / 9) |
Uptime: | 38:09:49 |
Calls: | 11,106 |
Calls today: | 3 |
Files: | 186,086 |
Messages: | 1,751,440 |