Bash To Basics
Connor McKelvey
What's a Shell?
- A Unix Program
- A REPL
- Command Language
- *writes function in Terminal*
What is Bash
- A Replacement for the original Bourne Shell /bin/sh
- Other Shells
- Zsh
- Fish
Unix Philosophy
- Write programs that do one thing and do it well
- Write programs to work together
- Write programs to handle text streams, because that is a universal interface
Sound Like Microservices?
JSON/HTTP being the standard interface
The development of pipes in 1973 formalized the existing principle of stdin-stdout into a philosophy in Version 3 Unix, with older software rewritten to comply. Previously visible in early utilities such as wc, cat, and uniq, McIlroy cites Thompson's grep as what "ingrained the tools outlook irrevocably" in the operating system, with later tools like tr, m4, and sed imitating how grep transforms the input stream.[5]
https://en.wikipedia.org/wiki/Unix_philosophy
Bash Basics
- Anatomy of a Command
- Stdout, Stdin
- https://learnxinyminutes.com/docs/bash/
- Strings, Variables, Command Subsitution
Bash Scripting
- Shebang and Options
- chmod +x
- Inputs, outputs, and functions
- Exit codes
The Hotness
- Redirection and Pipes
- File Descriptors
Bash
By Connor Finn McKelvey
Bash
- 891