Instant AWK GUI under Windows

A dirt simple method of sprucing up your
AWK output under Windows.

Beware wordwrap & enjoy!
 
later on,
Mike

-- 
http://topcat.hypermart.net

<-- cut here -->

<!--

Instant GUI for AWK output - Michael S. Sanders 2009

This example will capture the output of your AWK program
and render that output dynamically to an HTML stream
within a graphical window.

Requires Windows, and the WSH scripting host, both
of which are native to any modern Windows installation.

To use this example, follow these three steps:

1. Save this example to a file with an extension of 'HTA'
eg - 'example.hta' (HTA meaning 'HyperText Application'
is a proprietary format for Internet Explorer).

2. Edit the line below containing 'program.awk datafile'
and replace with your AWK program file, and your datafile.

3. double click your HTA file to run it.

-->

<html>
<head>
<title>My application</title>

<hta:application 
id="MyApp"
applicationName="My application"
border="thick"
borderStyle="normal"
caption="yes"
contextMenu="yes"
icon=""
innerBorder="no"
maximizeButton="yes"
minimizeButton="yes"
navigable="yes"
scroll="yes"
scrollFlat="no"
selection="yes"
showInTaskBar="yes"
singleInstance="yes"
sysMenu="yes"
version="1.0"
windowState="normal"
>
</head>

<body>

<script type="text/vbscript">
Set WshShell = CreateObject("Wscript.shell")
Set objExec= WshShell.Exec("%comspec% /c gawk -f program.awk datafile")
output = objExec.StdOut.ReadAll
document.write("<pre>" & output & "</pre>")
</script>

</body>
</html>

<-- cut here -->

0
mss
12/19/2009 2:14:51 PM
comp.lang.awk 3348 articles. 0 followers. Post Follow

0 Replies
730 Views

Similar Articles

[PageSpeed] 45

Reply:

Similar Artilces:

"AWK" or "Awk" or "awk"?
How should one write the name of the slickest, best, text-massaging programing language, exactly, when referring to it in documentation? (And NO four letter words here, please. ;-) In the GAWK man page, "AWK" occurs 64 times, "awk" 10 times and "Awk" not at all. The system in the man page seems to be to use "AWK" for the abstract language, but "awk" to refer to the POSIX standard or any specific implementation of AWK which isn't GAWK. So, is it "AWK" or "Awk" or "awk", or is it really not that important? --...

Awk location: #!/bin/awk -f versus #!/usr/bin/awk
I am developing some AWK scripts, as usual, my first line is: #!/bin/awk -f This works on Linux system, bun on my Mac OS X 10.5 (Leopard), it should be: #!/usr/bin/awk -f Is there a way to create a script which works independently of where AWK is? Thanks. Hai Hai Vu wrote: > I am developing some AWK scripts, as usual, my first line is: > #!/bin/awk -f > > This works on Linux system, bun on my Mac OS X 10.5 (Leopard), it > should be: > #!/usr/bin/awk -f > > Is there a way to create a script which works independently of where > AWK is? Thanks. > Hai > Oft...

GUI with awk?
I had written some of mine awk scripts. How to create GUI after clicking buttion particular awk script should be running.? Is there any tool or any suggestion. Please help. Vilas wrote: > I had written some of mine awk scripts. How to create GUI after > clicking buttion particular awk script should be running.? That is the easier of two scenarios (the much more difficult one would be to control a GUI from within awk). In your case, chose any tool / programming language you like for building GUIs and that can also execute an external command. That external command would be your aw...

GUI Awk
Where can I find a version of awk that hs a GUI interface ? I need to build Executalbe script under windows environment . Thanks in advance . Bless u happytoday wrote: > Where can I find a version of awk that hs a GUI interface ? I need to > build Executalbe script under windows environment . Thanks in > advance . Bless u To write your awk program you can use any text editor with GUI interface. The awk program saved in the file system can then be called from any command shell you have on your WinDOS environment (DOS box, MKS kornshell, Cygwin bash, etc.). If that doesn't fit; wh...

awk++
This message is to announce awk++, object oriented AWK. The "bootstrap" "compiler" is written and working. The next step is to rewrite the "compiler" in awk++ and compile and test it. Below is the current README file, which describes the awk++ language additions and behaviors. As explained in the README, the "compiler" reads in awk++ and outputs AWK, so it can be used either asynchronously or synchronously. I would very much appreciate feedback on syntax and methodology. I'm not wedded to any of it, except that it be class-based, ala C++, Java...

awk
I'd like if it's possible to use awk in strqsh mode . Thanks Running Awk: http://www.itjungle.com/mgo/mgo011503-story02.html and http://www.omniuser.org/Downloads/Qshell-OpenSSH-OMNI.pdf On 21 Giu, 23:56, "Emile" <em...@e.nl> wrote: > Running Awk: > > http://www.itjungle.com/mgo/mgo011503-story02.html > > and > > http://www.omniuser.org/Downloads/Qshell-OpenSSH-OMNI.pdf=A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 Now I need to use strqsh mode; I use awk in strqsh mode adding to $PATH environment variable the path /QOpenSys/usr/bin, bu...

awk
grep Glen ~/Check| awk -F " " "{ print $1 }" I have a file filled with name separated by spaces how can i edit the line above to split by space James wrote: > grep Glen ~/Check| awk -F " " "{ print $1 }" > > I have a file filled with name separated by spaces how can i edit the line > above to split by space Not sure I read your question correctly, but how about something like: jc@soyuz:/tmp$ awk 'BEGIN { FS=" " } { print $2 "," $1 }' << EOT > John Glenn > Buzz Aldrin > EOT Glenn,John Aldrin,Buz...

awk
I have the following gawk script that I came up with on my linux box that works and I'd like to be able to use it on my iBook but from the manpage for awk the FIELDWIDTH variable isn't supported. Can the script be easily converted to awk from gawk? Or should I look for a gawk implementation for OSX? { FIELDWIDTHS = "7 22 9 7 18 48 8 25 7 3 15 1 2 2 2 2 2 2 2 2 2 30" } { print $1, ";", $2, ";", $3, ";", $4, ";", $5, ";" $7, ";", $8} I know the length of each field, but the fields aren't necessarially sepera...

AWK
hi, I am having following txt file. ------------------------------------------------------------------- 00032 Clemson Univ, Howard , Dept Chem, Clemson, SC 29634 USA. 00032 Clemson Univ, Howard , Films, Clemson, SC 29634 USA. 10032 Oak Ridge Natl Lab, High , Oak Ridge, TN 37831 USA. 12029 Oak Ridge Natl Lab, Oak Ridge, TN 37831 USA. 00029 Univ Texas, Dept Phys, Austin, TX 78712 USA. ------------------------------------------------------------------ i want output in following manner. 00032 Clemson Univ 00032 Clemson Univ 10032 Oak Ridge Nat1 Lab 12029 Oak Ridge Nat1 Lab 000...

awk
Why in the following code? varA=2; strA="`cat /root/mytempdir/wordlist.txt | awk '{print $ 2}'`" strB="`cat /root/mytempdir/wordlist.txt | awk '{print $ $varA}'`" strA contains the second word of line 1 and strB contains all line 1 ??? Thanks AL wrote: > Why in the following code? > > varA=2; > > strA="`cat /root/mytempdir/wordlist.txt | awk '{print $ 2}'`" > strB="`cat /root/mytempdir/wordlist.txt | awk '{print $ $varA}'`" > > strA contains the second word of line 1 > and strB contains...

new at "awk.info": SQL Awk; embedding Awk in "C"; and more
Here are the recent updates to http://awk.info . (For all updates to awk.info, subscribe to http://tinyurl.com/rss4awk. To contribute to awk.info, see http://awk.info/?contribute .) ----------------------------------------------------------- NEWS Inteview with Aharon Robbins. - http://awk.info/?news/robbinsTalks Ed Morton shows how to print ranges within an input file. - http://awk.info/?tip/printranges Janis Papanagnou shows how to use header names to reference column data. - http://awk.info/?tip/readheaders Tibor Palinkas shows how to embed Awk inside "C". - http://awk.info/?...

new at "awk.info": fun & games (with awk); the amazing Awk assembler; and more
(apologies if this posts twice) Here are the recent updates to http://awk.info . (For all updates to awk.info, subscribe to http://tinyurl.com/rss4awk. To contribute to awk.info, see http://awk.info/?contribute .) ---------------------------------------------------------- 1) Fun and games with Awk 1a) http://awk.info/?Games - New section: Games in Awk 1b) http://awk.info/?mastermind - YSA's implementation of Mastermind ---------------------------------------------------------- 2) New section: interpreters in Awk 2a) http://awk.info/?awk100/aaa - Herbert Spencer's Amazi...

new at "awk.info": SQL Awk; embedding Awk in "C"; and more
Here are the recent updates to http://awk.info . (For all updates to awk.info, subscribe to http://tinyurl.com/rss4awk. To contribute to awk.info, see http://awk.info/?contribute .) ----------------------------------------------------------- NEWS Inteview with Aharon Robbins. - http://awk.info/?news/robbinsTalks Ed Morton shows how to print ranges within an input file. - http://awk.info/?tip/printranges Janis Papanagnou shows how to use header names to reference column data. - http://awk.info/?tip/readheaders Tibor Palinkas shows how to embed Awk inside "C". - http://awk.info/?...

new at "awk.info": SQL Awk; embedding Awk in "C"; and more
Here are the recent updates to http://awk.info . (For all updates to awk.info, subscribe to http://tinyurl.com/rss4awk. To contribute to awk.info, see http://awk.info/?contribute .) ----------------------------------------------------------- NEWS Inteview with Aharon Robbins. - http://awk.info/?news/robbinsTalks Ed Morton shows how to print ranges within an input file. - http://awk.info/?tip/printranges Janis Papanagnou shows how to use header names to reference column data. - http://awk.info/?tip/readheaders Tibor Palinkas shows how to embed Awk inside "C". - http://awk.info/?...

Web resources about - Instant AWK GUI under Windows - comp.lang.awk

Instant - Wikipedia, the free encyclopedia
An instant is an infinitesimal moment in time , a moment whose passage is instantaneous. The continuous nature of time and its infinite divisibility ...

Facebook Adds Video Sharing, Instant Photo Sharing, Stickers Shortcuts To Messenger For IOS
... it easier to access the app’s features, and the major additions were the ability to send videos and play them within Messenger, and instant ...

Facebook Instant Articles rolls out across Asia
Facebook has announced the beta launch of Instant Articles across Asia.

Publishing Instant Articles Directly From Your Content Management System
Publishing Instant Articles Directly From Your Content Management System

Flixster’s Rotten Tomatoes Movie Site Launches Facebook Instant Personalization Features
Facebook is making a new push for its Instant Personalization program today, adding the first new partner since it launched last April. Flixster’s ...

Court approves employers' right to read your instant messages and WhatsApp
Australian employers are already within their rights to read employees' instant messages.


Saturday Lotto: WA has another instant millionaire
WA has another instant millionaire, with one of four division one prizes in the Saturday Lotto draw heading west.

Should we Expect Triple-A titles in the PS Plus Instant Game Collection in January 2016?
Bidness Etc asks whether January will be the month when we can see a free triple-A offering on the PS4 for PS Plus subscribers.

Gawker CEO Nick Denton on Facebook Instant Articles: It's better than 'the ad tech mess'
Gawker Media owner Nick Denton appears to have performed a complete u-turn on his view toward Facebook Instant Articles. Facebook Instant Articles ...

Resources last updated: 2/3/2016 4:52:38 PM