Shell Scripting: Environment Variables & Bash

<aside> 💻

Master environment variables, variable assignment, and conditional logic in Bash. Learn how shells work, what PATH does, how to customize your prompt, and the critical dollar sign rule for variables. Commands are programs, PATH is everything, and the $ sign rule trips everyone up at first!

</aside>

At-a-glance checklist

Key takeaways

The dollar sign rule: Think of $ as "get the value" - you write without $, you read with $. This trips up everyone initially!

Commands are programs: ls, grep, cat aren't magic - they're compiled executables stored in PATH directories. You could write your own!

PATH is everything: Shell searches PATH directories left-to-right to find commands. First match wins.

Bash for assessments: Different shells (zsh, fish, csh) have different syntax. Stick to Bash for consistency.