Shell Scripting
Est. read time: 1 minute | Last updated: November 07, 2024 by John Gentile
Contents
The UNIX shell and shell scripting is a system of interpretation of user commands (from a file or direct from the command line) into specific application and/or operating system actions. Due to scripts being interpreted, they are not compiled like traditional programming languages and are thus not as fast or efficient as compiled programs.
In UNIX systems, there’s a variety of shells to choose from; from the original Bourne Shell, sh
, to more niche shells such as csh
and ksh
, the focus of this page is on the popular Bourne Again Shell or bash
. Bash is the standard shell in Linux systems and is a superset of the Bourne shell providing compatible commands and operation as the original Bourne shell as well as more advanced features. A Linux system lists an overview of its available shells in the file /etc/shells
.
Tools
- ShellCheck: a shell script static analysis tool that gives warnings and suggestions for bash/sh shell scripts.
- bash-completion: programmable completion functions for bash
Best Practices
References
- The Art of Command Line
- Bash Guide for Beginners by Machtelt Garrels
- Advanced Bash-Scripting Guide by Mendel Cooper
- GNU/Linux Command-Line Tools Summary by Gareth Anderson
- Bash Reference Manual- GNU
- CLI text processing with GNU awk
- Command Line Interface Guidelines
- The Linux Command Line - William Shotts
- pure bash bible
- alebcay/awesome-shell
- Ten Things I Wish I’d Known About bash