Vtome.ru - электронная библиотека

The AWK Programming Language, 2nd Edition (Final)

  • Добавил: literator
  • Дата: 22-09-2023, 18:59
  • Комментариев: 0
Название: The AWK Programming Language, 2nd Edition (Final)
Автор: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
Издательство: Addison-Wesley/Pearson
Год: 2024
Страниц: 231
Язык: английский
Формат: True PDF, True EPUB (Retail Copy)
Размер: 17.0 MB

The goal of this book is to teach you what AWK is and how to use it effectively. AWK was created in 1977 as a simple programming language for writing short programs that manipulate text and numbers with equal ease. It was meant as a scripting language to complement and work well with Unix tools, following the Unix philosophy of having each program do one thing well and be composable with other programs. The computing world today is enormously different from what it was in 1977. Computers are thousands of times faster and have a million times as much memory. Software is different too, with a rich variety of programming languages and computing environments. The Internet has given us more data to process, and it comes from all over the world. We’re no longer limited to the 26 letters of English either; thanks to Unicode, computers process the languages of the world in their native character sets. Even though AWK is nearly 50 years old, and in spite of the great changes in computing, it’s still widely used, a core Unix tool that’s available on any Unix, Linux, or macOS system, and usually on Windows as well. There’s nothing to download, no libraries or packages to import — just use it. It’s an easy language to learn and you can do a lot after only a few minutes of study.

AWK is a programming language that makes it possible to handle simple computations with short programs, often only one or two lines long. An AWK program is a sequence of patterns and actions that specify what to look for in the input data and what to do when it’s found. Awk searches a set of files that contain text (but not non-text formats like Word documents, spreadsheets, PDFs and so on) for lines that match any of the patterns; when a matching line is found, the corresponding action is performed. A pattern can select lines by combinations of regular expressions and comparison operations on strings, numbers, fields, variables, and array elements. Actions may perform arbitrary processing on selected lines; the action language looks like C but there are no declarations, and strings and numbers are built-in data types.

Programmers and other computer users spend a lot of time doing simple, mechanical data manipulation — changing the format of data, checking its validity, finding items that have some property, adding up numbers, printing summaries, and the like. All of these jobs ought to be mechanized, but it’s a real nuisance to have to write a special-purpose program in a language like C or Python each time such a task comes up.

Here's what programmers today are saying: "I love Awk." "Awk is amazing." "It is just so damn good." "Awk is just right." "Awk is awesome." "Awk has always been a language that I loved."

It's easy: "Simple, fast and lightweight." "Absolutely efficient to learn because there isn't much to learn." "3-4 hours to learn the language from start to finish." "I can teach it to new engineers in less than 2 hours."

It's productive: "Whenever I need to do a complex analysis of a semi-structured text file in less than a minute, Awk is my tool." "Learning Awk was the best bang for buck investment of time in my entire career." "Designed to chew through lines of text files with ease, with great defaults that minimize the amount of code you actually have to write to do anything."

It's always available: "AWK runs everywhere." "A reliable Swiss Army knife that is always there when you need it." "Many systems lack Perl or Python, but include Awk."

Chapter 1 is a tutorial on how to get started; after reading even a few pages, you will have enough information to begin writing useful programs. The examples in this chapter are short and simple, typical of the interactive use of Awk. The rest of the book contains a variety of examples, chosen to show the breadth of applicability of Awk and how to make good use of its facilities. Some of the programs are ones we use personally; others illustrate ideas but are not intended for production use; a few are included just because they are fun.

Chapter 2 shows Awk in action, with a number of small programs that are derived from the way that we use Awk for our own personal programming. The examples are probably too idiosyncratic to be directly useful, but they illustrate techniques and suggest potential applications.
...
Chapter 8 discusses experiments with algorithms, including testing and performance evaluation. It shows several sorting algorithms, and culminates in a version of the Unix make program.

Chapter 9 explains some of the historical reasons why Awk is as it is, and contains some performance measurements, including comparisons with other languages. The chapter also offers suggestions on what to do when Awk is too slow or too confining.

Appendix A, the reference manual, covers the Awk language in a systematic order. Although there are plenty of examples in the appendix, like most manuals it’s long and a bit dry, so you will probably want to skim it on a first reading.

Скачать The AWK Programming Language, 2nd Edition (Final)



ОТСУТСТВУЕТ ССЫЛКА/ НЕ РАБОЧАЯ ССЫЛКА ЕСТЬ РЕШЕНИЕ, ПИШИМ СЮДА!










ПРАВООБЛАДАТЕЛЯМ


СООБЩИТЬ ОБ ОШИБКЕ ИЛИ НЕ РАБОЧЕЙ ССЫЛКЕ



Внимание
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.