Pro bash programming scripting the GNU/Linux shell

Pro Bash Programming teaches you how to effectively utilize the Bash shell in your programming. The Bash shell is a complete programming language, not merely a glue to combine external Linux commands. By taking full advantage of Shell internals, Shell programs can perform as snappily as utilities wr...

Descripción completa

Detalles Bibliográficos
Autores principales: Johnson, Chris. author (author), Varma, Jayant. author
Formato: Libro electrónico
Idioma:Inglés
Publicado: Berkeley, CA : Apress 2015.
Edición:Second edition
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629915106719
Tabla de Contenidos:
  • Contents at a Glance; Chapter 1: Hello, World: Your First Shell Program; The Code; The File; The Naming of Scripts; Selecting a Directory for the Script; Creating the File and Running the Script; Choosing and Using a Text Editor; Building a Better "Hello, World!"; Summary; Commands ; Concepts ; Variables ; Exercises; Chapter 2: Input, Output, and Throughput; Parameter and Variables; Positional Parameters; Special *@#0?_!- Parameters; Variables ; Arguments and Options ; echo, and Why You Should Avoid It; printf: Formatting and Printing Data; Escape Sequences
  • break continue; Summary; Commands; Concepts; Exercises; Chapter 4: Command-Line Parsing and Expansion; Quoting; Brace Expansion; Tilde Expansion; Parameter and Variable Expansion; Arithmetic Expansion; Command Substitution; Word Splitting; Pathname Expansion; Process Substitution; Parsing Options; Summary; Commands; Exercises; Chapter 5: Parameters and Variables; The Naming of Variables; The Scope of a Variable: Can You See It from Here?; Shell Variables; Parameter Expansion; Bourne Shell; {var:-default} and {var-default}: Use Default Values
  • {var:+alternate}, {var+alternate}: Use Alternate Values {var:=default}, {var=default}: Assign Default Values ; {var:?message}, {var?message}: Display Error Message If Empty or Unset; POSIX Shell; {#var}: Length of Variable's Contents ; {var%PATTERN}: Remove the Shortest Match from the End; {var%%PATTERN}: Remove the Longest Match from the End; {var#PATTERN}: Remove the Shortest Match from the Beginning; {var##PATTERN}: Remove the Longest Match from the Beginning; Bash; {var//PATTERN/STRING}: Replace All Instances of PATTERN with STRING
  • {var:OFFSET:LENGTH}: Return a Substring of var{!var}: Indirect Reference; Bash-4.0; Sec21; {var^PATTERN}: Convert to Uppercase ; {var,PATTERN}: Convert to Lowercase ; Positional Parameters; Arrays; Integer-Indexed Arrays ; Sec27; Displaying Arrays; Assigning Array Elements; Associative Arrays ; Summary; Commands; Concepts; Chapter 6: Shell Functions; Definition Syntax; Compound Commands; Getting Results; Set Different Exit Codes; Print the Result; Place Results in One or More Variables; Function Libraries; Using Functions from Libraries; Sample Script; Summary
  • Commands