0

I've been struggling for days with an AWK script that solves this Equation

I can't seem to run AWK with any program I download for windows, so I was wondering how I can run AWK in a windows program like Visual Studio Code or if I can translate the AWK script into literally any other language that works for windows.

  • 2
    GNU `awk` can be compiled for Windows, and there's also a binary release. See [installation for MS Windows](https://www.gnu.org/software/gawk/manual/html_node/PC-Installation.html). I also like [Chocolatey](https://chocolatey.org/install) package manager, which has [GNU awk 5.1](https://community.chocolatey.org/packages/gawk). Once Chocolatey is installed, `choco install awk` (in PowerShell or command prompt (`cmd.exe`)) to install awk. Once you have awk, you can run an awk script in PowerShell or command prompt with `awk -f myscript.awk`. There's also WSL and cygwin to get Unix utilities. – dan Dec 03 '21 at 01:42

1 Answers1

0

if I can translate the AWK script into literally any other language that works for windows.

What you describe above is done by tools called transpilers. My cursory search revelead existence of AWK to go and AWK to C transpilers. Naturally before trying to use either make sure you can use go or C in your windows.

Daweo
  • 31,313
  • 3
  • 12
  • 25