Bash Shell Scripting
Learn Bash Shell Scripting
Bash is the shell, or command language interpreter, that will appear in the GNU operating system. Bash is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh). It offers functional improvements over sh for both programming and interactive use.
In addition, most sh scripts can be run by Bash without modification. The improvements offered by Bash include: Command line editing, Unlimited size command history, Job Control, Shell Functions and Aliases, Indexed arrays of unlimited size, Integer arithmetic.
Bash Scripting: In addition to the interactive mode, where the user types one command at a time, with immediate execution and feedback, Bash also has the ability to run an entire script of commands, known as a “Bash shell script”. A script might contain just a very simple list of commands or even just a single command or it might contain functions, loops, conditional constructs. In effect, a Bash shell script is a computer program written in the Bash programming language.
Shell scripts are commonly used for many system administration tasks, such as performing disk backups, evaluating system logs, and so on. They are also commonly used as installation scripts for complex programs. They are particularly suited to all of these because they allow complexity without requiring it.