If you work with Linux, you’re probably familiar with the command line. The more you work with it, and the more you learn, the better you understand how powerful it can actually be. The interface of the command line that also interprets the commands used is called a shell. In this shell scripting in Linux tutorial, you’re going to learn how to write a shell script to be run in the command line.
Most of the Linux distributions use the bash shell natively – however, you can use everything you learn in this shell scripting tutorial in KornShell, C shell, Z shell, Bourse, and Tcsh shell as well. All the user has to do is enter their commands to the command line. However, typing each and every command manually is a lot of work, especially when the task at hand requires a lot of repetition.
To save time, you can prepare a shell script to run whenever you need a particular set of commands to be executed. You can do it using either a text editor or a graphical user interface, and save the script with a .txt or .sh extension. The commands your shell script can contain include variables, loops, arrays, and various statements.
Shell scripting in Linux is especially useful when you need to automate repetitive tasks. Curious about how to run a shell script? That’s even easier: you would simply enter the name of the file into the command line. This can be an especially useful skill for any developer, network engineer, system administrator, or basically anyone who works with Linux, Unix, or Mac operating system.
In this tutorial, you will learn how to write a shell script step by step, simplifying the work by combining multiple commands in a specific sequence. And that’s not all: I will also explain various methods of debugging, accepting user input, and other tricks I have picked up in my fifteen years of experience. Ever since the late 1990s, I’ve been working in the IT departments of Amazon, Xerox, Hewlett-Packard, and other industry giants.
We will go through all the most common shell scripting errors to make sure you know how to find them and solve them in time. I will explain what special variables you can use and how to accept and handle command line arguments. Knowing how to write a shell script quickly and safely, you will be able to save a ton of time, as you learn how to un a shell script.
Along with just over two hours of video lectures, you will be getting extra materials to download. Using them, you will grasp how to write a shell script a lot quicker. I’ll be providing a checklist, a cheat sheet, and a template to make the shell scripting process as simple as it can possibly get.
You will also find some practice exercises so you can try out everything you learned straight away. Roll up your sleeves and get your notes ready – we’ve got lectures to take!
Course consist of total 2h 1min of content, in total.
Jason is a professional system administrator, consultant, and author. He has utilized his Linux skills at companies such as Xerox, UPS, Hewlett-Packard, and Amazon.com.
Jason has professional experience with CentOS, RedHat Enterprise Linux, SUSE Linux Enterprise Server, and Ubuntu. Jason also has experience supporting proprietary Unix operating systems including AIX, HP-UX, and Solaris.
Jason is the author of "Linux for Beginners," "Python Programming," and "Command Line Kung Fu."