Loading lesson…
The terminal is where real work happens. Pipes, variables, and loops in bash are a superpower — and AI is surprisingly good at shell one-liners.
A command's stdout can be piped into the next command's stdin. That is the whole philosophy. Small tools, composed with `|`.
#!/usr/bin/env bash set -euo pipefail # Find the 5 largest files in the current tree find . -type f -printf "%s %p\n" 2>/dev/null \ | sort -rn \ | head -n 5 \ | awk '{ printf "%.1f MB\t%s\n", $1/1024/1024, $2 }'set -euo pipefail is the safety line. It makes scripts fail loudly instead of silently.#!/usr/bin/env bash set -euo pipefail ENVS=(dev staging prod) for env in "${ENVS[@]}"; do url="https://${env}.example.com/health" code=$(curl -s -o /dev/null -w "%{http_code}" "$url") echo "$env -> $code" doneArrays, quoted expansions, and curl's write-out format. The basics of a real ops script.The big idea: small tools, piped together, with strict error handling and quoted variables. AI writes bash fluently — you just need to recognize the safety rules.
6 questions · take it digitally for instant feedback at tendril.neural-forge.io/learn/quiz/end-progx-bash-shell-builders
What is the main idea of "Bash and Shell With AI"?
Which concept is most central to "Bash and Shell With AI"?
What should a careful learner remember about "Always set -euo pipefail"?
You want to use AI after this lesson. What is the safest next step?
How should AI output about pipe be treated?
Name one way to verify an AI answer about pipe.