Tclforawk

png Tclforawk is a graphical front-end for managing and running AWK scripts. It is written in Tcl, and requires the Tcl/Tk package installed on your computer. Tcl/Tk is a very easy installation (really!). Tclforawk is a text file; it may be changed in any text editor, and does not need to be compiled..... it will be simply executed by Tcl/Tk. However, you do not need to edit anything..... if you want to run Tclforawk as-is right out of the box, you need to do nothing but install Tcl/Tk on your computer. If you are familiar with coding Tcl/Tk, you may edit Tclforawk as you desire in a simple text editor.


Tclforawk neatly manages and runs awkscripts that are called in by clicking 2 buttons in its toolbar. It acts like a combined file selector, text editor and terminal window, which makes the AWK-running process simpler if you have lots of scripts.

Recall that running AWK from the command line in a terminal window, requires a command something like....

awk -f awkscript.awk inputfilename.txt > ouputfilename.out

If you have a trainload of awkscripts, it can get klunky finding them, editing input files and running them in a terminal window. At least, I found it klunky after collecting a few dozen awkscripts that I use for engineering calcs. The command line rules, text rules, scripts rule, all true, but sometimes lots of files makes the task overwhelming and GUI's can help manage these.

The sequence to run scripts is shown in images below.

  • Click the awkscript button and select the awkscript to run.
  • Click the input file button to load the basic input file into the main text box for editing.
  • Click the RUN button to execute the awkscript, using the edited input file and write the results to the screen.
  • Repeat this process as desired.
  • Save results files as desired.

The Tclforawk window....


Clicking the awkscript button pulls up the file manager dialog, showing all available awkscripts. The name of the awkscript appears in the top entry box of the Tclforawk window, but nothing will appear in the main textbox window.


Clicking the inputfile button pulls up the file manager dialog, showing all available input file formats. The name of the input file appears in the second entry box of the Tclforawk window, and the input file will appear in the main textbox window. The numeric input values in the file may be edited as desired in the main textbox.



Clicking the RUN button, sends the edited input file to your awkscript, and the results show in the main textbox window.



Tclforawk Setup Instructions


sig

Reference and Resources for TCL / TK

Tikmark Home Page