Book Image

Mastering Linux Shell Scripting

By : Andrew Mallett
Book Image

Mastering Linux Shell Scripting

By: Andrew Mallett

Overview of this book

Shell scripting is a quick method to prototype a complex application or a problem by automating tasks when working on Linux-based systems. Using both simple one-line commands and command sequences complex problems can be solved with ease, from text processing to backing up sysadmin tools. In this book, you’ll discover everything you need to know to master shell scripting and make informed choices about the elements you employ. 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. Implement functions and edit files using the Stream Editor, script in Perl, program in Python – as well as complete coverage of other scripting languages to ensure you can choose the best tool for your project.
Table of Contents (21 chapters)
Mastering Linux Shell Scripting
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Summary


This now finishes our look at Python and it certainly has been a brief tour. We can again emphasize the similarities that you will see in many languages and the importance of learning any coding language. What you learn in one language will help in most of the other languages that you come across.

What we learn from the Zen of Python will help us design and develop a great code. We can print the Zen of Python using the following Python code:

>>>import this

We can type the code on the REPL prompt. Keeping your code clean and well-spaced out will aid in the readability and ultimately this will help with the maintenance of the code.

We have also seen that the Python likes you to be explicit in your code and will not implicitly convert the data types.

We are also at the end of the book but hopefully, the start of your scripting career. Good luck and thank you for reading.