The GNU Bourne-Again Shell (Bash) is a powerful work environment and scripting engine. A competent security professional skillfully leverages Bash scripting to streamline and automate many Linux tasks and procedures. In this Section, we will introduce Bash scripting and explore several practical scenarios.
A Bash script is a plain-text file that contains a series of commands that are executed as if they had been typed at a terminal prompt. Generally speaking, Bash scripts have an optional extension of .sh (for ease of identification), begin with #!/bin/bash and must have executable permissions set before they can be executed.