comp.lang.awk
  Home FAQ Contact Sign in
comp.lang.awk only
 
Advanced search
December 2008
motuwethfrsasuw
1234567 49
891011121314 50
15161718192021 51
22232425262728 52
293031     1
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.awk Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  igawk - gawk discrepancy         


Author: jh
Date: Dec 26, 2008 10:55

The GNU Awk User's Guide says, "igawk should behave just like gawk
externally."

But, there is the following discrepancy.

$ cat hello.awk | igawk -f -
igawk:/dev/stdin:0: cannot find -

$ cat hello.awk | gawk -f -
Hello World!
$

This example demonstrates the issue, but the need for this feature has
to do with any program or utility that generates (G)AWK code and wants
to take advantage of @include.

Any chance igawk could be changed to match gawk in this behavior, Arnold?

Regards,

Jim Hart
2 Comments
  Re: back to GUI awk         


Author: jh
Date: Dec 25, 2008 21:11

Ummm - what about a Web browser? Write one or more CGI programs in AWK,
and you're good to go. For those who don't want to mess with Apache or
IIS, check out Plain Old Webserver (POW). It's a Firefox extension that
can be easily configured to treat files ending in .awk as CGIs.

http://davidkellogg.com/wiki/Main_Page?origin=moz_pow

Timothy menzies wrote:
> On 2008-12-22, Manuel Collado <m.collado@lml.ls.fi.upm.es> wrote:
>> there are some who call me tim.. escribió:
>>> On Dec 17, 11:02 am, happytoday gmail.com> wrote...
Show full article (1.47Kb)
7 Comments
  copy alpha 15 of awk++ posted         


Author: jh
Date: Dec 25, 2008 20:35

As before, the URL is: http://www.avcnet.org/users/jhart/awk++/

New features:

- class inheritance
- a Windows batch file, awkpp.bat (written for Vista by Gabor
Grothendieck), that compiles and runs an awk++ program
in one pass
- a *nix Bourne shell script, "awkpp-run.sh", that compiles and
runs in one pass
- special delete() method for releasing the memory taken by an
object
- @include files, similar to igawk, that can include awk++ code
(currently requires that the included file is in the same
directory as 'awkpp.awk' or that a full path name is provided)

Syntax changes:

- object creation now uses Ruby-like syntax,
classname.new(optional parameters); the method named 'new'
gets called automatically, providing for programmer-controlled
initialization.
Show full article (1.76Kb)
no comments
  Re: back to GUI awk         


Author: happytoday
Date: Dec 25, 2008 11:39

On Dec 23, 12:13 pm, Adrian Davis satisoft.com> wrote:
> On 22 Dec, 23:48, Manuel Collado <m.coll...@lml.ls.fi.upm.es> wrote:
>
>
>
>> Timothy menzies escribió:
>
>> function confirm( message ) {
>>    TK_SERVER = "tclsh"
>>    gui = "package require Tk;" \
>>          "label .label -text \"" message "\";" \
>>          "button .yes -text \"Yes\"" \
>>          "  -command {puts stdout \"yes\"; destroy .};" \
>>          "button .no -text \"No\"" \
>>          "  -command {puts stdout \"no\"; destroy .};" \
>>          "pack .label .yes .no"
>>    print gui |& TK_SERVER
>>    TK_SERVER |& getline TMP
>>    return TMP
> ...
Show full article (1.64Kb)
no comments
  Re: back to GUI awk         


Author: Andrew Schorr
Date: Dec 25, 2008 09:57

Sorry to jump in late, but I thought I should mention that zenity is a
great
tool for adding dialog boxes to shell scripts. I believe that it is
available in Cygwin. This is probably simpler than using tclsh, I
think.

Itt probably does not help if the goal is to have a persistent GUI
window interacting with the process, but zenity is perfect for popping
up
dialog boxes to ask the user various types of questions.

Regards,
Andy
no comments
  Re: BEGINFILE / ENDFILE patch for gawk now available         


Author: Aharon Robbins
Date: Dec 24, 2008 21:07

In article ,
Aharon Robbins skeeve.com> wrote:
> As an experiment, I have made available a patch that implements two
> new special patterns, BEGINFILE and ENDFILE.

Steffen Schuler then wrote:
> Your patch for gawk-3.1.6 doesn't work for
>
> gawk 'BEGINFILE { print FILENAME }' file
>
> --> No output.
>
> (gawk has to read the file at least partially (e.g. EOF), for BEGINFILE
> having effect.)
>
> But this is a feature and no bug.

It is a bug. The patch is attached. I will update the patch on the website.
Show full article (1.84Kb)
no comments
  Multi line bill         


Author: user.postgresql
Date: Sep 22, 2008 17:25

Hi,

I'm very new in awk and I'd like some recommendation in processing a
multi line bill. The purpose of this exercise is so I could import a
cleaner file into a database. Here's a sample extract...

"0000449","253500","00310789 ","20080807","Call Detail
Section ","0987654321 "
"0000450","353501"," ","
"," "," ","MOBCL","Mobile
Calls ...
Show full article (3.67Kb)
3 Comments
  transferring fields of one file to fields of another file         


Author: starlite79
Date: Sep 21, 2008 13:50

Hi,

I have a C program and Fortran that are similar in what they do. I
have functions that have tolerances and precisions (among other
things) as arguments. What I would like to do is transfer the
precision and tolerance fields of the C file to the corresponding ones
in the Fortran file.

What I have at this point does nothing other than remove one of the
fields in the updated Fortran file. I run the awk program at the
command line as awk -f transfer_file c_file fortran_file >
updated_fortran_file.
Show full article (1.89Kb)
no comments
  ($0, NF) same as (NF, $0) ???         


Author: Prateek
Date: Sep 20, 2008 05:19

Hi,
My question is how are the outputs same for the two below queries.
First has 'print $0, NF' and the other 'print NF, $0'; 'print NF, $0'
is working as expected but not 'print $0, NF'; Can someone please
explain.

grampian@/export/home/sys1mi/delete_1--->gawk '/N_APPL_SYST_CPNT/
{print $0, NF}' *
4 N_APPL_SYST_CPNT number := 35;
8 from prwmgr.appl_syst_cpnt_run@spartap where
appl_syst_cpnt_id=N_APPL_SYST_CPNT...
Show full article (2.26Kb)
3 Comments
  Finding the Latest File         


Author: dnlchen
Date: Sep 18, 2008 18:12

Input:



Index of /pub/testenv on <a href="http://test.example.com:21" rel="nofollow" class="url" target="_blank">test.example.com:21</a>


Index of /pub/testenv on test.example.com:21





2008 Sep 18 23:53 File ftp://test.example.com:21/
pub/testenv/.bash_history">.bash_history (2885 bytes)
2008 Sep 03 15:48 Directory ftp://test.example.com:21/
pub/testenv/.ssh/">.ssh/
2008 Jun 27 22:40 Directory ftp://test.example.com:21/
pub/testenv/.subversion/">.subversion/
2008 Jul 28 18:38 File ftp://test.example.com:21/
pub/testenv/.viminfo">.viminfo (5884 bytes)
2008 Sep 05 18:59 File ftp://test.example.com:21/
pub/testenv/abcd.0.256.3.tar.gz">ass.0.256.3.tar.gz (96594844 ...
Show full article (1.59Kb)
4 Comments
1 2 3 4 5 6 7 8 9