A little bit of Git and programming
Typical system administration tasks involve command-line tools. Tasks of greater complexity often need to chain several commands and share the results with each other. Linux commands can be combined to solve repetitive and difficult tasks using the Bash shell environment and basic programming functions.
As a command interpreter and a programming language in its own right, the Bash shell environment allows you to run routines and use expressions, besides running other programming languages.
These routines simplify the lists of commands, which can be included in a file called a Bash script.
Next, we’ll learn how to create Bash scripts.
Bash scripting
Bash scripting consists of programming using commands as the program’s instructions. This strategy automates repetitive tasks, reducing them to a single line through expressions such as logic gates, conditions, loops, and so on. Thus, it facilitates the consolidation of several...