Cargando…

Learning Linux Shell Scripting : Leverage the power of shell scripts to solve real-world problems, 2nd Edition.

Linux has been one of the widely adopted and popular OS when it comes to leveraging scripting and automating common tasks. With this book, readers will get to grips with shell scripting, automating repetitive tasks, text processing, regular expressions, pattern matching, backup and restore, and much...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Naik, Ganesh
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing, 2018.
Edición:2nd ed.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Title Page; Copyright and Credits; Dedication; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Getting Started and Working with Shell Scripting; Comparison of shells; Tasks done by the shell; Working in the shell; Learning basic Linux commands; Our first script
  • Hello World; When not to use scripts; Various directories; Working with permissions; Changing file permissions; The chmod command; Technique one
  • the symbolic method; Technique two
  • the numeric method; Setting umask; Setuid; Setgid; Sticky bit; Summary.
  • Chapter 2: Drilling Deep into Process Management, Job Control, and AutomationIntroducing process basics; Monitoring processes using ps; Process management; Process monitoring tools
  • top, iostat, and vmstat; Understanding ""at; Understanding crontab; Summary; Chapter 3: Using Text Processing and Filters in Your Scripts; Text filtering tools; Head and tail; The diff command; The cut command; The paste command; The join command; The uniq command; The comm command; The tr command; The sort command; IO redirection; File descriptors; Redirection; Brace expansion.
  • Pattern matching with the vi editorPattern searching using grep; Summary; Chapter 4: Working with Commands; Learning shell interpretation of commands; Checking and disabling shell internal commands; The exit status; Command substitution; Command separators; Command1; command2; Command grouping; Logical operators; Command1 & command2; Command1 & & command2; Command1 || command2; Pipes; Summary; Chapter 5: Exploring Expressions and Variables; Understanding variables; Working with environment variables; The local variable and its scope; Exporting variables; Working with read-only variables.
  • Working with command-line arguments (special variables, set and shift, getopt)Understanding set; Understanding shift; Resetting positional parameters; Understanding getopts; Understanding default parameters; Working with arrays; Creating an array and initializing it; Accessing array values; Summary; Chapter 6: Neat Tricks with Shell Scripting; Interactive shell scripts
  • reading user input; Summarizing the read command with options; The here document and the <<operator; The here operator with the sort command; The here operator with the wc command; The utility ed and here operator.
  • A script for sending messages to all logged-in usersUsing the <<here operator for FTP usage and data transfer; Turning off variable substitution; The here string and the <<<operator; File handling; Introducing file handling; Using exec to assign a file descriptor (fd) to file; Understanding the opening, writing, and closing of a file; Understanding reading from a file; Understanding reading and writing to a file; Using the read command on a file descriptor (fd); Reading from one file and writing to another file; Displaying the file descriptor information from the /proc folder.
  • File handling
  • reading line by line.