While a basic knowledge of shell usage is required, it starts with a discussion of shell building blocks and common practices. Then it presents the grep, awk and sed tools that will later be used to create more interesting examples. The second half of the course is about shell constructs such This guide discusses concepts useful in the daily life of the serious Bash user. The second half of the course is about shell constructs such as loops, conditional tests, functions and traps, and a number of ways to make interactive scripts. All chapters come with examples and exercises that will help you become familiar with the theory.
|Published (Last):||12 August 2017|
|PDF File Size:||8.92 Mb|
|ePub File Size:||13.1 Mb|
|Price:||Free* [*Free Regsitration Required]|
Feb 6, Bash and Bash scripts Common shell An example Bash script Bash Guide for Beginners Version 1. Why this guide? Who should read this book?
New versions, translations and availability Revision History Copyright information What do you need? Conventions used in this document Organization of this document Common shell programs General shell functions Shell types Advantages of the Bourne Again SHell Bash is the GNU shell Features only found in bash Executing commands Shell built-in commands Executing programs from a script Building blocks Shell building blocks Developing good scripts Properties of good scripts A word on order and logic An example Bash script: mysystem.
Example init script Writing and debugging scripts Creating and running a script Writing and naming Executing the script Script basics Which shell will run the script? Adding comments Debugging Bash scripts Debugging on the entire script Debugging on part s of the script The Bash environment Shell initialization files System-wide configuration files Individual user configuration files Changing shell configuration files Types of variables Creating variables Exporting variables Reserved variables Special parameters Script recycling with variables Quoting characters Escape characters Single quotes Double quotes ANSI-C quoting Shell expansion Brace expansion Tilde expansion Shell parameter and variable expansion Command substitution Arithmetic expansion Process substitution Word splitting File name expansion What are aliases?
Creating and removing aliases More Bash options Displaying options Changing options Regular expressions What are regular expressions? Regular expression metacharacters Basic versus extended regular expressions Examples using grep What is grep? Grep and regular expressions Pattern matching using Bash features Character ranges Regular expressions 4. Character classes The GNU sed stream editor What is sed? Interactive editing Printing lines containing a pattern Deleting lines of input containing a pattern Ranges of lines Find and replace with sed Non-interactive editing Reading sed commands from a file Writing output files The GNU awk programming language Getting started with gawk What is gawk?
Gawk commands The print program Printing selected fields Formatting fields The print command and regular expressions Special patterns
Bash Guide for Beginners
Bash Guide for Beginners by Machtelt Garrels