وبلاگ بلیان

Mastering Linux Shell Scripting,: A practical guide to Linux command-line, Bash scripting, and Shell programming, 2nd Edition

معرفی کتاب «Mastering Linux Shell Scripting,: A practical guide to Linux command-line, Bash scripting, and Shell programming, 2nd Edition» نوشتهٔ Ebrahim, Mokhtar; Mallett, Andrew;، منتشرشده توسط نشر Packt Publishing - ebooks Account در سال 2018. این کتاب در 5 صفحه، فرمت epub، زبان انگلیسی ارائه شده است. «Mastering Linux Shell Scripting,: A practical guide to Linux command-line, Bash scripting, and Shell programming, 2nd Edition» در دستهٔ بدون دسته‌بندی قرار دارد.

Shell scripting is a quick method to prototype a complex application or a problem by automating tasks when working on Linux-based systems. This book will make use of both simple one-line commands and command sequences and complex problems can be solved with ease, from text processing to backing up sysadmin tools.;Cover; Copyright and Credits; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: The What and Why of Scripting with Bash; Technical requirements; Types of Linux shells; What is bash scripting?; The bash command hierarchy; Command type; Command PATH; Preparing text editors for scripting; Configuring vim; Configuring nano; Configuring gedit; Creating and executing scripts; Hello World!; Executing the script; Checking the exit status; Ensuring a unique name; Hello Dolly!; Running the script with arguments; The importance of correct quotes; Printing the script name. Cover Copyright and Credits Packt Upsell Contributors Table of Contents Preface Chapter 1: The What and Why of Scripting with Bash Technical requirements Types of Linux shells What is bash scripting? The bash command hierarchy Command type Command PATH Preparing text editors for scripting Configuring vim Configuring nano Configuring gedit Creating and executing scripts Hello World! Executing the script Checking the exit status Ensuring a unique name Hello Dolly! Running the script with arguments The importance of correct quotes Printing the script name. Declaring variablesUser-defined variables Environment variables Variable scope Command substitution Debugging your scripts Summary Questions Further reading Chapter 2: Creating Interactive Scripts Technical requirements Using echo with options Basic script using read Script comments Enhancing scripts with read prompts Limiting the number of entered characters Controlling the visibility of the entered text Passing options Passing parameters with options Read options values Try to be standard Enhancing learning with simple scripts Backing-up with scripts. Connecting to a serverVersion 1 -- ping Version 2 -- SSH Version 3 -- MySQL/MariaDB Reading files Summary Questions Further reading Chapter 3: Conditions Attached Technical requirements Simple decision paths using command-line lists Verifying user input with lists Using the test shell built-in Testing strings Testing integers Testing file types Creating conditional statements using if Extending if with else Test command with the if command Checking strings Checking files and directories Checking numbers Combining tests More conditions with elif. Creating the backup2.sh using elifUsing case statements Recipe -- building a frontend with grep Summary Questions Further reading Chapter 4: Creating Code Snippets Technical requirements Abbreviations Using code snippets Bringing color to the Terminal Creating snippets using VS Code Summary Questions Further reading Chapter 5: Alternative Syntax Technical requirement Recapping the test command Testing files Adding logic Square brackets as not seen before Providing parameter defaults Variables Special parameters Setting defaults When in doubt -- quote! Advanced tests using [[White space Other advanced features Pattern matching Regular expressions Regular expression script Arithmetic operations using (( Simple math Parameter manipulation Standard arithmetic tests Summary Questions Further reading Chapter 6: Iterating with Loops Technical requirement for loops Advanced for loops The IFS Counting directories and files C-style for loops Nested loops Redirecting loop output Controlling the loop while loops and until loops Reading input from files Creating operator menus Summary Questions Further reading. Master the complexities of Bash shell scripting and unlock the power of shell for your enterprise About This Book • Identify high-level steps such as verifying user input • Using the command line and conditional statements in creating/executing simple shell scripts • Create and edit dynamic shell scripts to manage complex and repetitive tasks • Leverage the command-line to bypass GUI and automate common tasks Who This Book Is For If you are a Linux administrator or a system administrator and are interested in automating tasks in your daily lives, saving time and effort, this book is for you. Basic shell scripting and command-line experience will be required. Familiarity with the tasks you need to automate will be helpful. What You Will Learn • Make, execute, and debug your first Bash script • Create interactive scripts that prompt for user input • Foster menu structures for operators with little command-line experience • Develop scripts that dynamically edit web configuration files to produce a new virtual host • Write scripts that use AWK to search and reports on log files • Draft effective scripts using functions as building blocks, reducing maintenance and build time • Make informed choices by comparing different script languages such as Python with BASH In Detail In this book, you'll discover everything you need to know to master shell scripting and make informed choices about the elements you employ. Grab your favorite editor and start writing your best Bash scripts step by step. Get to grips with the fundamentals of creating and running a script in normal mode, and in debug mode. Learn about various conditional statements' code snippets, and realize the power of repetition and loops in your shell script. You will also learn to write complex shell scripts. This book will also deep dive into file system administration, directories, and system administration like networking, process management, user authentications, and package installation and regular expressions. Towards the end of the book, you will learn how to use Python as a BASH Scripting alternative. By the end of this book, you will know shell scripts at the snap of your fingers and will be able to automate and communicate with your system with keyboard expressions. Style and approach The book will capture your attention and keep you engaged with the simplicity and clarity of each explanation. Every step is accompanied by screenshots so you can cross-check the results before moving on. Master the complexities of Bash shell scripting and unlock the power of shell for your enterprise About This Book Identify high-level steps such as verifying user input Using the command line and conditional statements in creating/executing simple shell scripts Create and edit dynamic shell scripts to manage complex and repetitive tasks Leverage the command-line to bypass GUI and automate common tasks Who This Book Is For If you are a Linux administrator or a system administrator and are interested in automating tasks in your daily lives, saving time and effort, this book is for you. Basic shell scripting and command-line experience will be required. Familiarity with the tasks you need to automate will be helpful. What You Will Learn Make, execute, and debug your first Bash script Create interactive scripts that prompt for user input Foster menu structures for operators with little command-line experience Develop scripts that dynamically edit web configuration files to produce a new virtual host Write scripts that use AWK to search and reports on log files Draft effective scripts using functions as building blocks, reducing maintenance and build time Make informed choices by comparing different script languages such as Python with BASH In Detail In this book, you'll discover everything you need to know to master shell scripting and make informed choices about the elements you employ. Grab your favorite editor and start writing your best Bash scripts step by step. Get to grips with the fundamentals of creating and running a script in normal mode, and in debug mode. Learn about various conditional statements' code snippets, and realize the power of repetition and loops in your shell script. You will also learn to write complex shell scripts. This book will also deep dive into file system administration, directories, and system administration like networking, process management, user authentications, and package installation and regular expressions. Towards the end of the book, you will learn how to use Python as a BASH Scripting alternative. By the end of this book, you will know shell scripts at the snap of your fingers and will be able to automate and communicate with your system with keyboard expressions. Style and approach The book will capture your attention and keep you engaged with the simplicity and clarity of each explanation. Every step is accompanied by screenshots so you can cross-check the results before moving on. Downloading the e... Master the complexities of Bash shell scripting and unlock the power of shell for your enterpriseKey FeaturesIdentify high-level steps such as verifying user inputUsing the command line and conditional statements in creating/executing simple shell scriptsCreate and edit dynamic shell scripts to manage complex and repetitive tasksLeverage the command-line to bypass GUI and automate common tasksBook DescriptionIn this book, you'll discover everything you need to know to master shell scripting and make informed choices about the elements you employ. Grab your favorite editor and start writing your best Bash scripts step by step. Get to grips with the fundamentals of creating and running a script in normal mode, and in debug mode. Learn about various conditional statements'code snippets, and realize the power of repetition and loops in your shell script. You will also learn to write complex shell scripts. This book will also deep dive into file system administration, directories, and system administration like networking, process management, user authentications, and package installation and regular expressions. Towards the end of the book, you will learn how to use Python as a BASH Scripting alternative. By the end of this book, you will know shell scripts at the snap of your fingers and will be able to automate and communicate with your system with keyboard expressions.What you will learnMake, execute, and debug your first Bash scriptCreate interactive scripts that prompt for user inputFoster menu structures for operators with little command-line experienceDevelop scripts that dynamically edit web configuration files to produce a new virtual hostWrite scripts that use AWK to search and reports on log filesDraft effective scripts using functions as building blocks, reducing maintenance and build timeMake informed choices by comparing different script languages such as Python with BASHWho this book is forIf you are a Linux administrator or a system administrator and are interested in automating tasks in your daily lives, saving time and effort, this book is for you. Basic shell scripting and command-line experience will be required. Familiarity with the tasks you need to automate will be helpful. Master the complexities of Bash shell scripting and unlock the power of shell for your enterprise Mastering shell scripting is made easy with this book that guides you through everything, right from using the Linux command line through to creating Bash scripts, while also helping you make informed choices about the elements you employ. You can use your favorite editor and start writing Bash scripts in a step-by-step manner. The book will also help you get to grips with the fundamentals of creating and running a script in normal mode, as well as in debug mode. You'll explore code snippets from various conditional statements, and realize the power of repetition and loops in your shell script. You will gradually learn to write complex shell scripts, before delving into file system administration, directories, and system administration such as networking, process management, user authentication, package installation, and regular expressions. Toward the concluding chapters, you will learn how to use Python as an alternative for Bash scripting. By the end of this book, you will be well-versed with shell scripts and have mastered the technique of automating and communicating with your system through keyboard expressions. If you are a Linux administrator or a system administrator and are interested in automating daily tasks to save time and effort, then this book is for you. Basic shell scripting and command-line experience will be required. Familiarity with the tasks you need to automate will also be helpful. Shell scripting is a quick method to prototype a complex application or a problem by automating tasks when working on Linux-based systems. This book will make use of both simple one-line commands and command sequences and complex problems can be solved with ease, from text processing to backing up sysadmin tools. COM088010 - COMPUTERS / System Administration / Linux and UNIX Administration,COM046070 - COMPUTERS / Operating Systems / Linux,COM088000 - COMPUTERS / System Administration / General
دانلود کتاب Mastering Linux Shell Scripting,: A practical guide to Linux command-line, Bash scripting, and Shell programming, 2nd Edition