Prose Supplements - Shop now
Kindle Unlimited
Unlimited reading. Over 4 million titles. Learn more
OR
$2.99 with 80 percent savings
Print List Price: $14.99

These promotions will be applied to this item:

Some promotions may be combined; others are not eligible to be combined with other offers. For details, please see the Terms & Conditions associated with these promotions.

You've subscribed to ! We will preorder your items within 24 hours of when they become available. When new books are released, we'll charge your default payment method for the lowest price available during the pre-order period.
Update your device or payment method, cancel individual pre-orders or your subscription at
Your Memberships & Subscriptions
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

Shell Scripting: How to Automate Command Line Tasks Using Bash Scripting and Shell Programming Kindle Edition

4.6 4.6 out of 5 stars 1,365 ratings

Shell Scripting Made Easy


If you want to learn how to write shell scripts like a pro, solve real-world problems, or automate repetitive and complex tasks, read on.


Hello. My name is Jason Cannon and I'm the author of Linux for BeginnersPython Programming for Beginners, and an instructor to thousands of satisfied students. I started my IT career in the late 1990's as a Unix and Linux System Engineer and I'll be sharing my real-world shell scripting and bash programming experience with you throughout this book.


By the end of this book you will be able to create shell scripts with ease. You'll learn how to take tedious and repetitive tasks and turn them into programs that will save you time and simplify your life on Linux, Unix, or MAC systems.


Here is what you will get and learn by reading this Shell Scripting ebook:



    • A step-by-step process of writing shell scripts that solve real-world problems.

    • The #1 thing you must do every time you create a shell script.

    • How to quickly find and fix the most shell scripting errors.

    • How to accept input from a user and then make decisions on that input.

    • How to accept and process command line arguments.

    • What special variables are available, how to use them in your shell scripts, and when to do so.

    • A shell script creation check list -- You'll never have to guess what to include in each of your shell scripts again. Just use this simple check list.

    • A shell script template (boilerplate). Use this format for each of your shell scripts. It shows exactly what to include and where everything goes. Eliminate guesswork!

    • Practice exercises with solutions so you can start using what you learn right away.

    • Real-world examples of shell scripts from my personal collection.

    • A download that contains the scripts used in the book and lessons. You'll be able to look at and experiment with everything you're learning.


    Learn to Program Using Any Shell Scirpting Language


    What you learn in this book can be applied to any shell, however the focus is on the bash shell and you'll learn some really advanced bash features. Again, whether you're using bash, bourne (sh), KornShell (ksh), C shell (csh), Z shell (zsh), or even the tcsh shell, you'll be able to put what you learn in this book to good use.


    Perfect for Linux, Unix, Mac and More!


    Also, you'll be able to use these scripts on any Linux environment including Ubuntu, Debian, Linux Mint, RedHat, Fedora, OpenSUSE, Slackware, Kali Linux and more. You're scripts will even run on other operating systems such as Apple's Mac OS X, Oracle's Solaris, IBM's AIX, HP's HP-UX, FreeBSD, NetBSD, and OpenBSD.


    Scroll up, click the Buy Now With 1 Click button and get started learning Linux today!

    Popular Highlights in this book

    Product details

    • ASIN ‏ : ‎ B015FZAXU6
    • Publication date ‏ : ‎ September 14, 2015
    • Language ‏ : ‎ English
    • File size ‏ : ‎ 965 KB
    • Text-to-Speech ‏ : ‎ Enabled
    • Screen Reader ‏ : ‎ Supported
    • Enhanced typesetting ‏ : ‎ Enabled
    • X-Ray ‏ : ‎ Enabled
    • Word Wise ‏ : ‎ Not Enabled
    • Print length ‏ : ‎ 99 pages
    • Customer Reviews:
      4.6 4.6 out of 5 stars 1,365 ratings

    About the author

    Follow authors to get new release updates, plus improved recommendations.
    Jason Cannon
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    "Linux doesn't have to be hard or complicated!"

    Jason Cannon started his career as a Unix and Linux System Engineer in 1999. Since that time he has utilized his Linux skills at companies such as Xerox, UPS, Hewlett-Packard, and Amazon.com. Additionally, he has acted as a technical consultant and independent contractor for small businesses as well as Fortune 500 companies.

    Jason has professional experience with CentOS, RedHat Enterprise Linux, SUSE Linux Enterprise Server, and Ubuntu. He has used several Linux distributions on personal projects including Debian, Slackware, CrunchBang, and others. In addition to Linux, Jason has experience supporting proprietary Unix operating systems including AIX, HP-UX, and Solaris.

    He enjoys teaching others how to use and exploit the power of the Linux operating system. Jason is the author of Command Line Kung Fu and Linux for Beginners. He is also the founder of the Linux Training Academy where he blogs and teaches online video training courses.

    Learn more by scrolling down the page and check out his books on the Linux operating system.

    Customer reviews

    4.6 out of 5 stars
    1,365 global ratings

    Review this product

    Share your thoughts with other customers

    Customers say

    Customers find the book provides a concise and informative introduction to shell scripting. They find it practical and helpful, with useful tips and self-study opportunities. Many consider it a good value for the price and say it gets them up and running quickly. Overall, customers find the exercises in the book easy to complete in one day.

    AI-generated from the text of customer reviews

    51 customers mention "Introduction to scripting"47 positive4 negative

    Customers find the book provides a concise introduction to shell scripting. They say it provides a good overview of some basics, with well-explained examples and problems to work on. The book teaches pure syntax and is easy to follow. It provides quick tips and useful information around logging and debugging. While somewhat shallow, it's perfect for beginners and the author knows how to present information concisely.

    "...It's really great that you've provided a straight forward and ​practical introduction to shell scripting...." Read more

    "...on the command line for a while, as it intelligently focuses on many of the most important, sometimes long-forgotten fundamentals, with the goal of..." Read more

    "This book is a great starting point for someone like me who already understands the basics of using bash commands, but wants to understand the often..." Read more

    "...The sections of this book are logically organized, with each new section building off of the information presented in the previous sections...." Read more

    30 customers mention "Knowledge"30 positive0 negative

    Customers find the book informative and practical. They appreciate the examples and helpful tips, especially around logging and debugging in Bash. The self-study opportunities are also appreciated. While some readers feel it's too short, it is a good resource for those just learning.

    "...is basically no fluff or divergence from what you've set out to do: teaching shell scripting succinctly...." Read more

    "...I particularly like that they provide sample answers to the exercise questions at the end of each chapter...." Read more

    "...The material is concise and to the point, with direct examples provided throughout...." Read more

    "...This book is insanely practical and extremely understandable. I really understand shell scripting now. I did all the exercises and you should too...." Read more

    9 customers mention "Value for money"9 positive0 negative

    Customers appreciate the book's value for money. They say it's worth every penny, the price is right, and free is good.

    "This book is worth every penny! I learned more about BASH scripting from this book than any previous learning material I've sunk my time into...." Read more

    "...All in all, the price is right if you have never scripted anything, but there are much better resources out there like Greg's Wiki, tldp, or even..." Read more

    "...Especially since it's as cheap as a bad cup of coffee!..." Read more

    "Good overview on some basics and as such provided some value. Generally, its not expensive, still isn't quite worth the 2.99...." Read more

    6 customers mention "Time efficiency"6 positive0 negative

    Customers find the book useful and quick to read. They say it gets them up and running quickly and the exercises can be completed in one day. The book saves them time at work and they start creating more scripts.

    "...me enough knowledge to start creating scripts that have saved me enough time at work to start creating more scripts at work...." Read more

    "...Also, the whole book and exercises can be completed in one day and you'll feel very confident and competent in your abilities as a shell scripter..." Read more

    "...It's been years since I did any bash in school. This book got me up and running quick!y." Read more

    "Quick and effective tool for teaching shell scripting. It shows the power of the show. I am glad I read it" Read more

    Top reviews from the United States

    • Reviewed in the United States on February 22, 2016
      Succinctly:

      In less than 100 pages, the author gets you up and running with [Bash] shell scripting. The entire book is precise, clear, and well structured. There is no divergence from the topic or the lessons, only short tips on common errors, style, and convention. In some cases I did look elsewhere to figure somethings out, but that was my own need for differentiated instruction. As such, I enrolled in the author's course on Udemy, which is cheap (link below).

      If, like me, you get distracted by implementation details and are looking for a book that will teach you shell scripting from scratch quickly (or quickly tie a bunch of disparate knowledge together), then this book is for you! I also highly recommend the Udemy course in addition to the book.

      Below is a reply to the author of "Shell Scripting", Jason Cannon, over at his course on Udemy [...]

      "Thanks for the this awesome course and your equally awesome book: "Shell Scripting"! I love that from pp 2 - 85 is basically no fluff or divergence from what you've set out to do: teaching shell scripting succinctly. I also love that I can switch in between your video lectures and the book, or go over sections from your video lectures in the book. Great flexibility and scaffolding for learning.

      It's really great that you've provided a straight forward and ​practical introduction to shell scripting. I will recommend this to anyone having the same problem as me with more traditional [Bash] scripting tutorials, which is that they have some amount of divergence from actual shell scripting. While I really am interested in things like Processes, Streams, and File Descriptors; I get really caught-up in the implementation side of things. I can focus on implementation later, as I progress in knowledge.

      So, again, thank you!"
      19 people found this helpful
      Report
    • Reviewed in the United States on January 22, 2018
      This book is good for both beginners and those who have been automating on the command line for a while, as it intelligently focuses on many of the most important, sometimes long-forgotten fundamentals, with the goal of helping the reader apply the 101s to solve actual real-life problems or enhance practical workflows.

      It's easy to pick up some bad habits, or lose knowledge, over time, of useful practices or methods, and a read of this guide followed up by semi-regular reviews will be the WD-40 to many people's squeaky scripting practices, I think no matter the level of experience.

      While you won't find scripting examples beyond even just 50 lines, this book is a toolbox more than a preconstructed assembly line. Its aim seems to impart wisdom on how this piece can help you in this area, and reminds us all about this other piece, which we forgot about but begs to be included in our existing workflow. And over time, this toolbox will increase the efficiency of, and perhaps even size/capabilities of our own personal assembly lines.

      As toolbox as it is, it's like any other toolbox and assumes that the reader knows enough about most of the individual tools and has worked with enough of them over time to make use of what's included in the box ("book").

      Don't buy until you've written a few of your own scripts/functions and want to take the next step in actually becoming good at this.
      18 people found this helpful
      Report
    • Reviewed in the United States on August 22, 2017
      This book is a great starting point for someone like me who already understands the basics of using bash commands, but wants to understand the often cryptic syntax of working shell scripts (your own or those you can find elsewhere). It doesn't assume a knowledge of basic programming skills, but if you've worked with python or some other scripting type language you will be able to understand the information more quickly.

      The examples were very good and easy to understand. I particularly like that they provide sample answers to the exercise questions at the end of each chapter.

      Minus one star only for not being quite as comprehensive as it could be, but still an excellent resource overall.
      2 people found this helpful
      Report
    • Reviewed in the United States on February 23, 2017
      This book is worth every penny! I learned more about BASH scripting from this book than any previous learning material I've sunk my time into. The sections of this book are logically organized, with each new section building off of the information presented in the previous sections. The material is concise and to the point, with direct examples provided throughout. The exercises at the end of each section really help you to start using what you've learned, and the solutions provided afterwards help you to see if you are on the right track or not.

      While this might not be the ultimate shell scripting bible, it certainly gives you a solid foundation to be comfortable reading and writing shell scripts.

      I would (and do) recommend this book to everyone interested in learning shell scripting.
      7 people found this helpful
      Report
    • Reviewed in the United States on June 25, 2021
      I felt fairly knowledgeable about Linux commands but very weak at shell scripting, so I bought this book because it was rated so highly. It is phenomenal. It's extremely short and the text is big, but that is the best thing about it--every page is valuable and clear. This book is insanely practical and extremely understandable. I really understand shell scripting now. I did all the exercises and you should too. They are pretty basic but they give you the hang of shell scripts. Can't say enough about this book.
      One person found this helpful
      Report

    Top reviews from other countries

    Translate all reviews to English
    • Edgar Hernandez
      5.0 out of 5 stars Excelente guía para principiantes
      Reviewed in Mexico on March 23, 2023
      Estoy empezando a descubrir el mundo de Linux y este libro es una guía bastante práctica para el suelo scripting
      Report
    • Richard R.
      5.0 out of 5 stars Clear, uncluttered information
      Reviewed in Canada on February 4, 2022
      A breath of fresh air among technical how-to books. Simple, clean explanations; easy to follow examples; and coding challenges with answers. All that's missing are rambling explanations, irrelevant information, and filler.
    • Goran Trifunovic
      5.0 out of 5 stars Good
      Reviewed in the United Kingdom on June 9, 2024
      Good
    • Víctor
      5.0 out of 5 stars Muy bien
      Reviewed in Spain on January 31, 2024
      Muy bien.
    • ampy
      5.0 out of 5 stars libro
      Reviewed in Italy on July 6, 2024
      libro ben organizzato

    Report an issue


    Does this item contain inappropriate content?
    Do you believe that this item violates a copyright?
    Does this item contain quality or formatting issues?