Artigo Revisado por pares

Awk — a pattern scanning and processing language

1979; Wiley; Volume: 9; Issue: 4 Linguagem: Inglês

10.1002/spe.4380090403

ISSN

1097-024X

Autores

Alfred V. Aho, Brian W. Kernighan, P. Weinberger,

Tópico(s)

Logic, programming, and type systems

Resumo

Abstract This paper describes the design and implementation of awk , a programming language which searches a set of files for patterns, and performs specified actions upon records or fields of records which match the patterns. Awk makes common data selection and transformation operations easy to express; for example, is a complete awk program that prints all input lines whose length exceeds 72 characters. The program prints each input line with the first field replaced by its logarithm. The program prints all lines in which the first field is different from the first field of the previous line. Patterns may include boolean combinations of regular expressions and of relational operators on strings, numbers, fields, variables, and array elements. Actions may include: the same matching constructions as in patterns; arithmetic and string expressions and assignments; if‐else, while, and for statements; formatted output; and multiple output streams.

Referência(s)
Altmetric
PlumX