Bash: The Glue That Holds Everything Together

Bash scripting is the Swiss Army knife of Linux. Regardless of what you are doing or need to do, bash is always there to do it.


Shout Outs To People Who Influenced My Bash Knowledge


1. Dave Eddy - YSAP.sh - The Kong Qiu of bash.

2. Jay LaCroix - learnlinu.tv - One of the best "Educators" on the internet


Why Bash?


  • It is literally everywhere! Available on virtually every Linux/macOS system and easily added to Windows
  • Powerful: Pipes, redirection, and process substitution
  • Simple: Easy to start, deep to master
  • If you are gonna use Linux, you WILL use bash at some point and more and more

.bashrc


My simple explaination of what a .bashrc is:


> Your pre-flight checklist procedures your terminal completes every time it starts


My Bash Workflow


I use bash for:


  • Development scripts: Build, test, deploy automation
  • System administration: User management, backups, monitoring
  • Data processing: Log analysis, file transformations
  • Dotfiles management: Symlinking, bootstrapping new machines

Tips and Tricks


  • Pipe | everything you can to another program
  • Use grep andawk`` every single time you are viewing more than 1 line of text
  • Use type command to determine if something is installed on your system (instead of which)
  • Use [[]] instead of [ ] for conditionals
  • Quote your variables: "$var"

← back to posts