Cargando…

Bash Cookbook : Leverage Bash Scripting to Automate Daily Tasks and Improve Productivity.

One of the most powerful tools that can be used almost every day is the Bash shell, but its true utility remains untapped by most users. Using a collection of recipes and intuitive lessons, the Bash Cookbook walks you through a series of exercises designed to teach you how to effectively use the Bas...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Brash, Ron
Otros Autores: Naik, Ganesh
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing Ltd, 2018.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Title Page; Copyright and Credits; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Crash Course in Bash; Getting started with Bash and CLI fundamentals; Your first Bash script with Vim; Creating and using basic variables; Hands-on variable assignment; Hidden Bash variables and reserved words; Conditional logic using if, else, and elseif; Evaluating binary numbers; Evaluating strings; Nested if statements; Case/switch statements and loop constructs; Basic case statement; Basic loops; For loop; Do while loop; Until loop; Using functions and parameters.
  • Using a function with parameters within a for loopIncluding source files; Including/importing a library script and using external functions; Retrieving return codes and output; Return code 101; Linking commands, pipes, and input/output; Redirection and pipe bonzanza; Getting program input parameters ; Passing your program flags; Getting additional information about commands; Summary; Chapter 2: Acting Like a Typewriter and File Explorer; Introduction; Basic searching for strings and files; Getting ready; How to do it ... ; How it works ... ; Using wildcards and regexes; Getting ready.
  • How to do it ... How it works ... ; Math and calculations in script; Getting ready; How to do it ... ; How it works ... ; Striping/altering/sorting/deleting/searching strings with Bash only; Getting ready; How to do it ... ; How it works ... ; Using SED and AWK to remove/replace substrings; Getting ready; How to do it ... ; How it works ... ; Formatting your data/output using echo and printf; Getting ready; How to do it ... ; How it works ... ; Readying your script for different languages with internationalization; Getting ready; How to do it ... ; How it works ...
  • Calculating statistics and reducing duplicates based on file contentsGetting ready; How to do it ... ; How it works ... ; Using file attributes with conditional logic; Getting ready; How to do it ... ; How it works ... ; Reading delimited data and altered output format; Getting ready; How to do it ... ; How it works ... ; Chapter 3: Understanding and Gaining File System Mastery; Introduction; Viewing files from various angles
  • head, tail, less, and more; Getting ready; How to do it ... ; How it works ... ; Searching for files by name and/or extension; Getting ready; How to do it ... ; How it works ...
  • Creating a diff of two files and patchingGetting ready; How to do it ... ; How it works ... ; Creating symbolic links and using them effectively; How to do it ... ; How it works ... ; Crawling filesystem directories and printing a tree; Getting ready; How to do it ... ; How it works ... ; Finding and deleting duplicate files or directories; Getting ready; How to do it ... ; How it works ... ; Joining and splitting files at arbitrary positions; Getting ready; How to do it ... ; How it works ... ; Generating datasets and random files of various size; Getting ready; How to do it ... ; How it works ...