help-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: awk and graphics


From: Manuel Collado
Subject: Re: awk and graphics
Date: Sun, 12 Nov 2023 12:12:29 +0100
User-agent: Mozilla Thunderbird

El 6/11/23 a las 22:58, Miriam English escribió:
I think I've found a super-simple solution that lets me run awk at full
speed and yet display the results as they develop.

"feh" (https://feh.finalrewind.org/) is a fast, small image viewer which
has an option (normally disabled) to update its display of an image
when it has changed. I recompiled it with inotify enable >
[snipped]

It's a nice, easy, temporary solution.

I'll continue to look into some of the other cool suggestions folks
have made here too. I'm still interested in awk being able to display
directly.

Well, what follows is not a direct display from gawk, but close to it.

Please find attached a little tksimple.awk library that interfaces a gawk script with a Tcl/Tk interpreter by means of a two-way pipe (the gawk |& operator). And a tktest.awk example is also attached. To test, just run:

     gawk -f tktest.awk

This requires a gawk version that supports two-way pipes (the |& operator), and a Tcl/Tk interpreter (tclsh/wish commands).

In my Ubuntu 64 bits box the screen is updated almost instantly at every step. Maybe it also fill your expectations.

HTH. Regards.

--
Manuel Collado - http://mcollado.z15.es

Attachment: tksimple.awk
Description: application/awk

Attachment: tk_test.awk
Description: application/awk


reply via email to

[Prev in Thread] Current Thread [Next in Thread]