Category: Awk

Bash Guide for Beginners

My image
  • Author: Machtelt Garrels
  • Format: online HTML
  • Price: free

The primary reason for this document is that a lot of readers feel the existing  HOWTO to be too short and incomplete, while the Bash Scripting guide is too much of a reference work. There is nothing in between these two extremes. It was also written on the general principal that not enough free basic courses are available, though they should be.

This is a practical guide which, while not always being too serious, tries to give real-life instead of theoretical examples. It was partly written because the author doesn’t get excited with stripped down and over-simplified examples written by people who know what they are talking about, showing some really cool Bash feature so much out of its context that you cannot ever use it in practical circumstances. You can read that sort of stuff after finishing this book, which contains exercises and examples that will help you survive in the real world.

From the author’s experience as a UNIX/Linux user, system administrator and trainer, he knows that people can have years of daily interaction with their systems, without having the slightest knowledge of task automation. Thus they often think that UNIX is not user friendly, and even worse, they get the impression that it is slow and old-fashioned. This problem is another one that can be remedied by this guide.

Chapters include:

  • Introduction
  • Bash and Bash scripts
  • Writing and debugging scripts
  • The Bash environment
  • Regular expressions
  • The GNU sed stream editor
  • The GNU awk programming language
  • Conditional statements
  • Writing interactive scripts
  • Repetitive tasks
  • More on variables
  • Functions
  • Catching signals

http://www.linuxtopia.org/online_books/bash_guide_for_beginners/index.html

Getting Started with Awk

My image
  • Author: Wikibooks, the open-content textbooks collection
  • Format: HTML
  • Price: free

This reference is written for a semi-knowledgable UNIX user who has just come up against a problem and has been advised to use awk to solve it. Perhaps one of the examples can be quickly modified for immediate use.

The book is a work in progress, and there may be incomplete or missing chapters.

Chapters include:

  • Getting started with awk
  • Preface
  • Which version
  • For More Info
  • References
  • Introduction
  • Some basics
  • Some Samples
  • Using regular expressions
  • Booleans
  • Start and End
  • Begin and End
  • Awk variables
  • Awk Arrays
  • Punctuation guide
  • And now for a grand example:

http://en.wikibooks.org/wiki/AWK

An Awk Primer

My image
  • Author: Wikibooks, the open-content textbooks collection
  • Format: HTML
  • Price: free

Awk has two faces: it is a utility for performing simple text-processing tasks, and it is a programming language for performing complex text-processing tasks. Awk is useful for simple, quick-and-dirty computational programming. Anybody who can write a BASIC program can use Awk, although Awk’s syntax is different from that of BASIC. Anybody who can write a C program can use Awk with little difficulty, and those who would like to learn C may find Awk a useful stepping stone, with the caution that Awk and C have significant differences beyond their many similarities.

The book is a work in progress, and there may be incomplete or missing chapters.

Chapters include:

  • Awk Overview
  • Awk Command-Line Examples
  • Awk Program Example
  • Awk Invocation and Operation
  • Search Patterns (1)
  • Search Patterns (2)
  • Numbers and Strings
  • Variables
  • Arrays
  • Operations
  • Standard Functions
  • Control Structures
  • Output with print and printf
  • A Digression: The sprintf Function
  • Output Redirection and Pipes
  • Using Awk from the Command Line
  • Awk Program Files
  • A Note on Awk in Shell Scripts
  • Nawk
  • Awk Quick Reference Guide

http://en.wikibooks.org/wiki/An_Awk_Primer