Documentation: Write Good Docs
Document scripts. Comments. README. Inline docs. Important.
Here's the thing: Documentation helps others. And you. Write it.
Comments
#!/bin/bash
# This script does something
# Author: Your Name
# Date: 2024-01-01
My take: Comments explain code. Write them.
README
# Script Name
Description of what it does.
## Usage
./script.sh arg1 arg2
My take: README explains usage. Write it.
Common Patterns
Header Comment
#!/bin/bash
#
# Script: script.sh
# Purpose: Does something
# Author: Your Name
#
What's Next?
Now that you understand documentation, let's talk about Testing Scripts.
Personal note: Documentation seemed unnecessary at first. Then I needed it. Now I write it always. It helps. Write it.