Awk







    ♥ Let us learn C ♥
♥ and Linux tmux Vim ♥

                              Awk - First Notes

                                    First Links


Content

AWK - First Links
sed
Elements
sed & awk
Notes
Links

AWK - WP - developed 1977 Aho Weinberger Kernighan, revised and extended 1985-88 resulting in GNU AWK or gawk, most widely deployed version, included with Linux packages - Brian Kernighan nawk (new awk) 1993, in use from BSD to avoid GPL license - preceded by sed (stream editor) 1973-74 - both designed for text processing, writing one-liner programs due to main loop and current line variables - inspiration for Perl language 1987, competing with Awk in 1990s sudo apt install gawk
awk --v // or --V, -version, gawk -v etc.
//> GNU Awk 4.1.4, API: 1.1 (GNU MPFR 4.0.1, GNU MP 6.1.2)
//>Copyright (C) 1989, 1991-2016 Free Software Foundation.
AWK - Overview - tutorialspoint.com
Climate Symphony




sed

sed - WP - was based on ed and qed at Bell Labs, developed 1973-74 - alternatives include AWK and Perl
Does sed have a feature superior to awk? [closed] - stackexchange.com
What is the difference between sed and awk? [closed] - stackoverflow.com
What are the differences among grep, awk & sed? [duplicate] - stackoverflow.com




Elements




sed & awk

sed & awk - UNIX Power Tools (Nutshell Handbooks) - by Dale Dougherty and Arnold Robbins - 2e 1997 - p435 - Amazon - book describes progression in functionality from grep to sed to awk

Table of Contents
Preface - xi
1 - Power Tools for Editing - 1
2 - Understanding Basic Operations - 8
3 - Understanding Regular Expression Syntax - 26
4 - Writing sed Scripts - 55
5 - Basic sed Commands - 78
6 - Advanced sed Commands - 106
7 - Writing Scripts for awk - 137
8 - Conditionals, Loops, and Arrays - 172
9 - Functions - 203
10 - The Bottom Drawer - 227
11 - A Flock of awks - 255
12 - Full-Featured Applications 278
13 - A Miscellany of Scripts - 324
A - Quick Reference for sed - 359
B - Quick Reference for awk - 365
C - Supplement for Chapter 12 - 382
Index - 397-407 --- About the Authors - 409-410 end of book

Preface
sed and awk many things in common, including regular expressions for pattern matching - natural expression learning from grep to sed to awk, cover all 3, focus on sed and awk - are tools for users, programmers, admins - sed stream editor, applies series of edits to a number of files - awk A. W. K. is progr. lang. permitting easy manipulation of data, formatted reports - book emphasiyes POSIX - original awk and two commercial ones, all POSIX - focus is writing scripts for sed and awk to quickly solve problems called "quick-fixes" - also covering scripts for larger problems needing more design and development - ch1-13 + A-C: ch1 overview of features and capabilities of sed and awk - ch2 Basics sed awk and progression from sed to awk, similar command-line syntax - ch3 reg expr, UNIX syntax, relying on grep and egrep - ch4 writing sed scripts with few commands, sed 3 chapter section ch4-6 - presents shell script simplifying sed scripts - ch5 basic sec commands - ch6 advanced sed, manipulate hold space - ch7 awk scripts, 5 chapter section ch7-11 - primary awk features, scripts, output ls command - ch8 conditionals, loops, arrays - ch9 functions, built-in functions and write own - ch10 bottom drawer for topics, execute UNIX commands from awk, direct outputs to files and pipes, debugging - ch11 original V7 awk, current Bell Labs awk, gawk, mawk - last 3 open source, MKS awk and Thomson Automation awk tawk for Visual Basic - ch12 2 longer complex awk scripts demonstrating nearly all features of awk, interactive spelling checker - second script processes and formats index for book or master index for st of books - ch13 different styles and techniques writing sed and awk scripts - appA sed ref commands + command-line options - appB awk ref + full description of lang. - appC supplement for ch12, listings spellcheck.awk + masterindex shell ... Availability or sed and awk ... DOS Versions ... Other Sources ... Sample Programs ... Example Source Code ... FTP ... Ftpmail ... BITFTP ... UUCP ... Conventions used in book: bold statements, functions, indentifiers, progr names - italic file and directory names, data types, emphasiye terms - constant width examples show contents or output - constant bold type by user - "" code fragment, system messages and symbols - $ for UNIX Bourne shell or Korn shell promt - [] optional elements, don't type brackets - ... ommited text - ⃞ literal space - • tab character - CTRL-X or ^X use of control characters, similar RETURN
About 2nd edition ... Thanks ... Thanks 1st edition - comments and questions ... Examples and Errata - oreilly.com

1 - Power Tools for Editing
p1 - sed and awk power tools like power saw for carpenter - saves time in text editing - solves better than vi for repeated edits over number of files - sed rifines solution instead of repeating keystrokes - initially seems like long way to accomplish task - be patient, learn sed and awk and learn recognizing where to use efficiently - will solve more quickly and broader range -




Notes

GNU - C




Links




Sessions

• Session 1 • Fri 2019 Auckland 11:50-13:30 WR awk.html - start ♡♡♡ - 14:55 R WP awk sed etc., links





         

web counter