•Arnošt Havelka
Bash Ripple Effect: Redirect Ledger
Use > and >> redirection to build simple, auditable text ledgers in Bash.
Start Interactive LessonBash Ripple Effect: Redirect Ledger
Redirection is how terminal output becomes durable evidence. This lesson trains the difference between creating a file with > and appending to the same file with >>.
Commands to Practice
echo 'start' > ledger.txt
echo 'next' >> ledger.txt
cat ledger.txt
Expected Terminal Signal
After both writes, the ledger should contain both lines in sequence:
start
next
Why This Matters
A lot of operational debugging depends on persistent traces. If you overwrite when you intended to append, you lose chronology and make incidents harder to reconstruct.
Common Mistakes
- Using
>repeatedly and deleting earlier lines by accident. - Appending to the wrong filename.
- Forgetting to validate file contents after writes.
Practice Extension
Create a three-line timeline:
echo 'step-1' > timeline.txt
echo 'step-2' >> timeline.txt
echo 'step-3' >> timeline.txt
cat timeline.txt
This is the same pattern used for lightweight run logs and manual audit trails.
References
These Microsoft Learn and Windows documentation links provide authoritative details for the commands used in this article.