• Home
Name Date Size #Lines LOC

..--

bugs-fixed/03-May-2024-448341

testdir/03-May-2024-71,99168,844

.gitignoreD03-May-202428 54

Android.bpD03-May-20243.1 KiB128117

ChangeLogD03-May-202411.4 KiB330234

FIXESD03-May-202446.5 KiB1,3591,034

LICENSED03-May-20241.1 KiB2421

METADATAD03-May-2024438 1615

MODULE_LICENSE_BSDD03-May-20240

OWNERSD03-May-202446 21

README.mdD03-May-20244 KiB12090

REGRESSD03-May-2024511 4031

TODOD03-May-2024757 2015

awk.1D03-May-202412.4 KiB633632

awk.hD03-May-20247 KiB259179

awkgram.yD03-May-202413.7 KiB493412

b.cD03-May-202431.4 KiB1,3451,096

lex.cD03-May-202413.1 KiB602531

lib.cD03-May-202420 KiB839693

main.cD03-May-20246.7 KiB262209

makefileD03-May-20243.5 KiB11255

maketab.cD03-May-20245.7 KiB193152

parse.cD03-May-20245.1 KiB277208

proto.hD03-May-20247.2 KiB207173

run.cD03-May-202447.4 KiB2,1281,906

tran.cD03-May-202417.1 KiB659550

README.md

1# The One True Awk
2
3This is the version of `awk` described in _The AWK Programming Language_,
4by Al Aho, Brian Kernighan, and Peter Weinberger
5(Addison-Wesley, 1988, ISBN 0-201-07981-X).
6
7## Copyright
8
9Copyright (C) Lucent Technologies 1997<br/>
10All Rights Reserved
11
12Permission to use, copy, modify, and distribute this software and
13its documentation for any purpose and without fee is hereby
14granted, provided that the above copyright notice appear in all
15copies and that both that the copyright notice and this
16permission notice and warranty disclaimer appear in supporting
17documentation, and that the name Lucent Technologies or any of
18its entities not be used in advertising or publicity pertaining
19to distribution of the software without specific, written prior
20permission.
21
22LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
23INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
24IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
25SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
26WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
27IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
28ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
29THIS SOFTWARE.
30
31## Distribution and Reporting Problems
32
33Changes, mostly bug fixes and occasional enhancements, are listed
34in `FIXES`.  If you distribute this code further, please please please
35distribute `FIXES` with it.
36
37If you find errors, please report them
38to bwk@cs.princeton.edu.
39Please _also_ open an issue in the GitHub issue tracker, to make
40it easy to track issues.
41Thanks.
42
43## Submitting Pull Requests
44
45Pull requests are welcome. Some guidelines:
46
47* Please do not use functions or facilities that are not standard (e.g.,
48`strlcpy()`, `fpurge()`).
49
50* Please run the test suite and make sure that your changes pass before
51posting the pull request. To do so:
52
53  1. Save the previous version of `awk` somewhere in your path. Call it `nawk` (for example).
54  1. Run `oldawk=nawk make check > check.out 2>&1`.
55  1. Search for `BAD` or `error` in the result. In general, look over it manually to make sure there are no errors.
56
57* Please create the pull request with a request
58to merge into the `staging` branch instead of into the `master` branch.
59This allows us to do testing, and to make any additional edits or changes
60after the merge but before merging to `master`.
61
62## Building
63
64The program itself is created by
65
66	make
67
68which should produce a sequence of messages roughly like this:
69
70	yacc -d awkgram.y
71	conflicts: 43 shift/reduce, 85 reduce/reduce
72	mv y.tab.c ytab.c
73	mv y.tab.h ytab.h
74	cc -c ytab.c
75	cc -c b.c
76	cc -c main.c
77	cc -c parse.c
78	cc maketab.c -o maketab
79	./maketab >proctab.c
80	cc -c proctab.c
81	cc -c tran.c
82	cc -c lib.c
83	cc -c run.c
84	cc -c lex.c
85	cc ytab.o b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o -lm
86
87This produces an executable `a.out`; you will eventually want to
88move this to some place like `/usr/bin/awk`.
89
90If your system does not have `yacc` or `bison` (the GNU
91equivalent), you need to install one of them first.
92
93NOTE: This version uses ANSI C (C 99), as you should also.  We have
94compiled this without any changes using `gcc -Wall` and/or local C
95compilers on a variety of systems, but new systems or compilers
96may raise some new complaint; reports of difficulties are
97welcome.
98
99This compiles without change on Macintosh OS X using `gcc` and
100the standard developer tools.
101
102You can also use `make CC=g++` to build with the GNU C++ compiler,
103should you choose to do so.
104
105The version of `malloc` that comes with some systems is sometimes
106astonishly slow.  If `awk` seems slow, you might try fixing that.
107More generally, turning on optimization can significantly improve
108`awk`'s speed, perhaps by 1/3 for highest levels.
109
110## A Note About Maintenance
111
112NOTICE! Maintenance of this program is on a ``best effort''
113basis.  We try to get to issues and pull requests as quickly
114as we can.  Unfortunately, however, keeping this program going
115is not at the top of our priority list.
116
117#### Last Updated
118
119Fri Dec 25 16:53:34 EST 2020
120