Bash programming

The context for this course is set by the Wikipedia article: the Unix Shell. All examples in the course are executed in the Bash shell. Occasional references are made to the other two more similar shells: sh, and ksh.

The bash shell implements the significant facets of sh and ksh, in alleged upward compatibilty, and has some features of csh, which is quite a different model than the sh, ksh, bash progression.

Different from most shell instruction, and since there is plenty of excellent shell material available, this course assumes the shell function is the organizing principle of any shell program. This course will make frequent use of that material.

Bash is now the pre-eminent user shell in Unix / Linux / and any *nix environment, including BSD and macOS until October 2019 that was replaced by zsh.

Bash Features includes command history, brace expansion and command-line completion among others.

Contents

 * 1)  Introduction:
 * 2) /Bash command-line completion/
 * 3) /Bash History/
 * 4)  Subshells
 * 5) Function Usage
 * 6)  Variables
 * 7)  Loops
 * 8) For Loop
 * 9) While Loop
 * 10) Do While Loop
 * 11)  Conditional Statements
 * 12) Shortcut if Statement
 * 13) If, Else-if, Else Ladder
 * 14) Switch / Case Statement
 * 15)  Interactive Input
 * 16)  Environment variables
 * 17) /Parsing Command-Line Arguments/ (usage function)
 * 18)  Miscellaneous topics
 * 19) Internal file separator (IFS)
 * 20) /error handling/  , read https://www.linuxjournal.com/content/bash-trap-command
 * 21) PID of last command:   (See also: