A Python implementation of the Unix wc command line utility
Find a file
2026-06-01 14:18:38 +00:00
.forgejo/workflows Add ruff (lint+format) and pyright with CI lint step 2026-05-31 11:27:52 +02:00
src/wc Bugfix in dataclass for show attribute; small changes + pyproject.toml adapted for linter errors in tests/ 2026-06-01 15:36:36 +02:00
tests Bugfix in dataclass for show attribute; small changes + pyproject.toml adapted for linter errors in tests/ 2026-06-01 15:36:36 +02:00
.gitignore Initial commit 2026-05-30 14:46:44 +00:00
.python-version uv init 2026-05-30 16:49:59 +02:00
AGENTS.md Add ruff (lint+format) and pyright with CI lint step 2026-05-31 11:27:52 +02:00
LICENSE Initial commit 2026-05-30 14:46:44 +00:00
pyproject.toml Bugfix in dataclass for show attribute; small changes + pyproject.toml adapted for linter errors in tests/ 2026-06-01 15:36:36 +02:00
README.md Refactor into src/wc/ package with module split 2026-05-30 20:43:17 +02:00
uv.lock Add ruff (lint+format) and pyright with CI lint step 2026-05-31 11:27:52 +02:00

wc

A Python implementation of the Unix wc command line utility.

Usage

# Run with uv (no install)
uv run wc [file ...]

# Run with python -m (no install)
python -m wc [file ...]

# Or install and run
uv pip install -e .
wc [file ...]

Options

Flag Description
-l Print newline counts
-w Print word counts
-c Print byte counts
-m Print character counts
-L Print maximum line length

Default (no flags): -l -w -c.

Tests

uv run pytest tests/

Reference

https://en.wikipedia.org/wiki/Wc_(Unix)