Book Image

Bash Scripting Solutions [Video]

By : Ganesh Sanjiv Naik, Ron Brash
Book Image

Bash Scripting Solutions [Video]

By: Ganesh Sanjiv Naik, Ron Brash

Overview of this book

<p>In Linux, one of the most commonly used and most powerful tools is the Bash shell. With its collection of engaging recipes, Bash solutions takes you through a series of exercises designed to teach you how to effectively use the Bash shell in order to create and execute your own scripts. The course starts by introducing you to the basics of using the Bash shell, and teaching you the fundamentals of generating any input from a command. With the help of a number of exercises, you will get to grips with automating daily tasks for sysadmins and power users. Once you have a hands-on understanding of the subject, you will move on to exploring more advanced projects that can solve real-world problems comprehensively on a Linux system. In addition to this, you will discover projects such as creating an application with a menu, beginning scripts on startup, parsing and displaying human-readable information, and executing remote commands with authentication using self-generated Secure Shell (SSH) keys. By the end of this course, you will have gained significant experience in solving real-world problems, from automating routine tasks to managing your systems and creating your own scripts.</p> <p>All the code and supporting files for this course are available on Github at&nbsp;<a href="https://github.com/PacktPublishing/Bash-Scripting-Solutions-video-" target="_blank">https://github.com/PacktPublishing/Bash-Scripting-Solutions-video-</a></p> <h1>Style and Approach</h1> <p>This video course introduces several key concepts of the Bash scripting language that you will need to master to begin writing functional scripts. Starting with input/output and string manipulation, the course moves progressively toward writing an application or daemon, using scripts for system/user tasks, and finally creating several unique mini-projects. Filled with best practices and tricks, this course provides you with everything possible to save you time and help you get things done easily on any Linux system.</p>
Table of Contents (8 chapters)
Chapter 4
Making a Script Behave Like a Daemon
Content Locked
Section 3
Invoking Commands When They Require Permissions
As a Linux user, you may have seen the sudo command or the su command. It allows a user to change users on the system at the console or execute commands momentarily with higher permissions. In this video we will look at few examples of the same. - Look at few important concept about sudo command - Try to run a command not as root, and without any previous sudo authorization - Use new visudo command to make edits to the /etc/sudoers file