Learning Linux shell scripting unleash the power of Shell scripts to solve real-world problems by breaking through the practice of writing tedious code
Unleash the power of shell scripts to solve real-world problems by breaking through the practice of writing tedious code About This Book Learn how to efficiently and effectively build shell scripts and develop advanced applications with this handy book Develop high quality and efficient solutions by...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing
2015.
|
Edición: | 1st edition |
Colección: | Community experience distilled.
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629923706719 |
Tabla de Contenidos:
- Cover; Copyright; Credits; About the Author; Acknowledgments; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Getting Started and Working with Shell Scripting; Comparison of Shells; Tasks done by Shell; Working in Shell; Learning basic Linux commands; Our first script - Hello World; Compiler and interpreter - difference in process; When not to use scripts; Various directories; Working more effectively with Shell - basic commands; Working with permissions; Changing file permissions; Command chmod; Technique one - the symbolic method
- Technique two - the numeric methodSetting umask; Setuid; Setgid; Sticky bit; Summary; Chapter 2: Drilling Deep into Process Management, Job Control, and Automation; Introducing 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; IO redirection
- File descriptorsRedirection; Brace expansion; Pattern matching with the vi editor; Pattern 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 variablesWorking 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 commandThe utility ed and here operator; A script for sending messages to all logged-in users; Using 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 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 command read on file descriptor (fd); Reading from one file and writing to another file
- Displaying the file descriptor information from the /proc folder