Thread View: comp.unix.shell
12 messages
12 total messages
Started by Michel MARTIN
Mon, 01 Oct 1990 15:48
awk
Author: Michel MARTIN
Date: Mon, 01 Oct 1990 15:48
Date: Mon, 01 Oct 1990 15:48
19 lines
894 bytes
894 bytes
When I type
awk ' { while (getline <"lettre" > 0 ) } '
I've an error like
awk: syntax error near line 1
awk: illegal statement near line 1
Does someone knows a solution please
tanks a lot
--
Michel Martin
INRIA Sophia Antipolis Tel: (33) 93 65 77 23
2004, Route des Lucioles Fax: (33) 93 65 77 65
BP 109 - 06561 Valbonne Cedex (France) Telex: INRIASA 970 050 F
Email:
Michel.Martin@mirsa.inria.fr
Re: awk
Author: Booker bense
Date: Tue, 02 Oct 1990 15:58
Date: Tue, 02 Oct 1990 15:58
28 lines
1280 bytes
1280 bytes
In article <8678@mirsa.inria.fr> mmartin@orphee.inria.fr (Michel MARTIN) writes:
>When I type
>
> awk ' { while (getline <"lettre" > 0 ) } '
>
>I've an error like
>
> awk: syntax error near line 1
> awk: illegal statement near line 1
>
>Does someone knows a solution please
>tanks a lot
- You probably have an older version of awk than the one documented in the
book " The Awk Programming Language" by A. W. & K. . The one in the book
doesn't come with most unix systems. You have to buy it from ATT. They
also have a nifty tool I wish we could get which takes awk programs and
writes c code.
I haven't found a way to get older awk to read more than one file. Mostly
I get around this by using multiple awk programs that pipe output into
each other.
Booker C. Bense
/* benseb@grumpy.sdsc.edu */
grep ?!$ Isn't that something that sticks to your shoes ? %-) &-) 8-)
Re: awk
Author: Brian Fitzgerald
Date: Tue, 02 Oct 1990 17:43
Date: Tue, 02 Oct 1990 17:43
18 lines
1095 bytes
1095 bytes
In article <8678@mirsa.inria.fr> mmartin@orphee.inria.fr (Michel MARTIN) writes:
>When I type
>
> awk ' { while (getline <"lettre" > 0 ) } '
>
If you are using GNU awk, eliminate the error by specifying a body for
the while loop. If you want no action, use ";", as in
gawk ' { while (getline <"lettre" > 0 ) ; } '
Additionally, if you are using Sun awk, I don't think you can use input
redirection with getline. The following runs without error in Sun awk.
awk ' { while (getline > 0 ) ; } '
Gawk is available by anonymous ftp from prep.ai.mit.edu (and many sites in
Europe as well.) I believe that to compile gawk, it is helpful to get "bison"
and "gcc", which are available from the same place.
awk to C (was awk)
Author: James Cummings
Date: Wed, 03 Oct 1990 13:34
Date: Wed, 03 Oct 1990 13:34
2 lines
521 bytes
521 bytes
There is an awk to C translator?....what's it called?
Re: awk
Author: Guy Harris
Date: Wed, 03 Oct 1990 18:51
Date: Wed, 03 Oct 1990 18:51
20 lines
1491 bytes
1491 bytes
>Additionally, if you are using Sun awk, I don't think you can use input
>redirection with getline. The following runs without error in Sun awk.
"Sun awk" should probably be replaced by "old awk" in the above.
"Sun awk" is basically either BSD "awk" (which is basically V7-addendum-tape
"awk") prior to SunOS 3.2, or S5R2 "awk" in 3.2 and later (AT&T sped it
up a fair bit after the V7 addendum tape version came out). (The only
Sun additions are minor null-pointer-dereferencing fixes and, as I
remember, a tweak to allow "-" to stand for "standard input" when used
as a program file name.)
GNU "awk" ("gawk") implements "new awk", which is the "awk" described by
the AWK book; AT&T also has a "new awk" implementation, available in
S5R3.1 and later and also available from the AT&T Toolchest. SunOS 4.1
has AT&T's S5R3.1 "new awk" implementation (again, with
null-pointer-dereferencing fixes; too bad the damn 3B2 ABI for S5R4
doesn't forbid location 0 being part of the address space, if it did
maybe all those frigging null pointer dereferences in the porting base
source would get FIXED).
Re: awk to C (was awk)
Author: shun.cheung
Date: Thu, 04 Oct 1990 09:58
Date: Thu, 04 Oct 1990 09:58
10 lines
857 bytes
857 bytes
In article <92@dlss2.UUCP>, james@dlss2.UUCP (James Cummings) writes:
> There is an awk to C translator?....what's it called?
There is a translator called "awkcc" implemented at AT&T Bell Labs.
It speeds up the program drastically.
--
-- Shun Cheung, AT&T Bell Laboratories, Middletown, New Jersey
electronic: shun@hou2d.att.com, att!hou2d!shun, or shun@cbnewsh.att.com
voice: (908) 615-5135
Re: awk to C (was awk)
Author: andrew.d.hay
Date: Thu, 04 Oct 1990 11:37
Date: Thu, 04 Oct 1990 11:37
11 lines
935 bytes
935 bytes
In article <92@dlss2.UUCP>, james@dlss2.UUCP (James Cummings) writes: > > There is an awk to C translator?....what's it called? awkcc -- Andrew Hay +------------------------------------------------------+ Ragged Individualist | You just have _N_O idea! It's the difference | AT&T-BL Ward Hill MA | between _S_H_O_O_T_I_N_G a bullet and _T_H_R_O_W_I_N_G it! | a.d.hay@att.com +------------------------------------------------------+
Re: awk to C (was awk)
Author: Lawrence V. Cipriani
Date: Thu, 04 Oct 1990 13:14
Date: Thu, 04 Oct 1990 13:14
15 lines
1082 bytes
1082 bytes
In article <92@dlss2.UUCP>, james@dlss2.UUCP (James Cummings) writes:
>
> There is an awk to C translator?....what's it called?
Yes. There is one in the AT&T Toolchest called awkcc. See my previous
post for Toolchest phone number and login.
Jon Bentley did some research on awkcc produced C programs and found the
C programs it generated were generally faster by an order of magnitude
than the awk input programs; however, there were a few instances where
the awk programs were faster. Usually if there was a lot of i/o the C
program was faster.
--
Larry Cipriani, att!cbvox!lvc or lvc@cbvox.att.com
"Save a logger, eat an owl"
Re: awk to C (was awk)
Author: Chris Calabrese
Date: Thu, 04 Oct 1990 18:48
Date: Thu, 04 Oct 1990 18:48
20 lines
1429 bytes
1429 bytes
In article <1990Oct4.113742.23650@cbnews.att.com> mvadh@cbnews.att.com (andrew.d.hay) writes: >In article <92@dlss2.UUCP>, james@dlss2.UUCP (James Cummings) writes: >> >> There is an awk to C translator?....what's it called? > >awkcc Hmm, seems like someone should expand on this a little. awkcc is a New Awk to C translator done in my center by J. Christopher Ramming. It is available from the AT&T Toolchest (no, I don't know the price). It should be fairly portable on UNIX boxes. Don't know about other OS'. I know it's been used on BSD 4.3 [VAX and CCI Tahoe], System V [3B2 and '386], SunOS [Sun 3 and Sun 4], and MIPS. Name: Christopher J. Calabrese Brain loaned to: AT&T Bell Laboratories, Murray Hill, NJ att!ulysses!cjc cjc@ulysses.att.com Obligatory Quote: ``pher - gr. vb. to schlep. phospher - to schlep light.philosopher - to schlep thoughts.''
Re: awk to C (was awk)
Author: Lawrence V. Cipriani
Date: Fri, 05 Oct 1990 12:14
Date: Fri, 05 Oct 1990 12:14
16 lines
1356 bytes
1356 bytes
In article <1990Oct4.131446.28302@cbnews.att.com>, lvc@cbnews.att.com (Lawrence V. Cipriani) writes:
> Yes. There is one in the AT&T Toolchest called awkcc. See my previous
> post for Toolchest phone number and login.
I feel obliged to post this email I received regarding awkcc from someone
who knows much more about it than I.
> Awkcc generally is very useful but there problems to be encountered,
> e.g. memory not freed NOR reused for closed pipes streams.
> Ended up switching back to C after a brief look inside awkcc;
The author of awkcc Chris Ramming left AT&T for academia; I have no idea
if anyone is actively maintaining awkcc.
--
Larry Cipriani, att!cbvox!lvc or lvc@cbvox.att.com
"Save a logger, eat an owl"
Re: awkcc (was awk)
Author: Bob Peirce #305
Date: Fri, 05 Oct 1990 13:17
Date: Fri, 05 Oct 1990 13:17
15 lines
1357 bytes
1357 bytes
In article <3802@network.ucsd.edu> booker@network.ucsd.edu (Booker bense) writes: >- You probably have an older version of awk than the one documented in the >book " The Awk Programming Language" by A. W. & K. . The one in the book >doesn't come with most unix systems. You have to buy it from ATT. They >also have a nifty tool I wish we could get which takes awk programs and >writes c code. > I have that tool but have never been able to get it to work. It requires, I think, an absolutely perfect C compiler to compile it. In particular, it makes heavy use of the pre-processor and was instrumental in helping me to discover several bugs in mine. Unfortunately, I have an Altos computer and you know what that means! -- Bob Peirce, Pittsburgh, PA 412-471-5320 ...!uunet!pitt!investor!rbp rbp@investor.pgh.pa.us
Re: awk to C (was awk)
Author: Chris Calabrese
Date: Fri, 05 Oct 1990 19:22
Date: Fri, 05 Oct 1990 19:22
17 lines
1358 bytes
1358 bytes
In article <1990Oct5.121442.13720@cbnews.att.com> lvc@cbnews.att.com (Lawrence V. Cipriani) writes: > >The author of awkcc Chris Ramming left AT&T for academia; I have no idea >if anyone is actively maintaining awkcc. Chris was away for a year, but he's been back since June (I think that's when he got back). Anyway, yes he's alive and well and living (at least working) in Murray Hill. It is true that there are problems with memory usage and pipes, but Chris is (supposed to be) working on it. In any event, he's still maintaining it. Name: Christopher J. Calabrese Brain loaned to: AT&T Bell Laboratories, Murray Hill, NJ att!ulysses!cjc cjc@ulysses.att.com Obligatory Quote: ``pher - gr. vb. to schlep. phospher - to schlep light.philosopher - to schlep thoughts.''
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads