[Script Name]: [Purpose]

Overview

Script: [script-name.sh / script-name.py]
Language: [Bash / Python / Go]
Location: [path/to/script]
Purpose: [One sentence — what problem does this solve?]

Quick Usage

# Most common usage
./script-name.sh [required-args]

Arguments & Options

Flag Argument Description Default

-f

FILE

Input file path

required

-o

DIR

Output directory

./output

-v

none

Verbose output

off

-h

none

Show help

Examples

Basic usage

./script-name.sh -f input.txt
Output
[expected output]

With options

./script-name.sh -f input.txt -o /tmp/results -v

Pipeline usage

cat data.txt | ./script-name.sh -f - | sort -u > results.txt

How It Works

Flow

[Input] → [Step 1: Parse] → [Step 2: Transform] → [Step 3: Output]

Key Functions

Function Purpose

parse_input()

[What it does]

transform_data()

[What it does]

write_output()

[What it does]

Critical Logic

# The core algorithm — explain the non-obvious parts
# [annotated code excerpt]

Dependencies

Dependency Purpose Install

[tool/library]

[Why needed]

[install command]

Error Handling

Exit Code Meaning Recovery

0

Success

1

Invalid arguments

Check usage with -h

2

File not found

Verify file path exists

Testing

# Run with test data
./script-name.sh -f tests/sample-input.txt

# Verify output
diff <(./script-name.sh -f tests/sample-input.txt) tests/expected-output.txt

Known Limitations

  • [Limitation 1 — what it can’t do]

  • [Limitation 2 — edge case not handled]

Changelog

Date Version Changes

YYYY-MM-DD

1.0

Initial version