awk
GNU awk (gawk) Skill
All output assumes gawk (awk --version shows GNU Awk). POSIX awk
compatibility is not a goal; gawk extensions are used freely where they help.
Core Principles
- Prefer one-liners. Multi-line awk scripts only when a one-liner becomes unreadable.
- Use
-Fto set the field separator explicitly. Never assume space. - Dry-run friendly by default. awk reads and prints; it never edits files
in-place. Redirect explicitly (
> out && mv out in) when the user wants in-place behavior. - Use
BEGIN/ENDblocks for setup and summary output. - Chain with pipes when awk alone isn't the cleanest tool.
- Never use awk to parse JSON or XML. Redirect to
jq/xmllintand say why.
More from bastos/skills
proxmox-admin
Administers Proxmox VE hosts, creates and manages VMs with qm, manages LXC containers with pct, configures storage, networking, clusters, and automates provisioning tasks via the Proxmox CLI.
302obsidian-daily
Manages Obsidian Daily Notes via the official Obsidian CLI. Creates and opens daily notes, appends entries (journals, logs, tasks, links), reads daily notes and vault files, searches vault content, and handles relative dates like "yesterday", "last Friday", and "3 days ago". Requires Obsidian 1.12+ with Command line interface enabled.
50conventional-commits
Formats commit messages using the Conventional Commits specification. Use when creating commits, writing commit messages, or when the user mentions commits, git commits, or commit messages. Ensures commits follow the standard format for automated tooling, changelog generation, and semantic versioning.
20tmuxinator
Helps create, edit, and debug tmuxinator project configurations, set up complex tmux session layouts, and automate development environment startup with multiple windows and panes.
15topydo
Manages todo.txt tasks using topydo CLI. Adds, lists, completes, prioritizes, tags, and organizes tasks with dependencies, due dates, recurrence, and projects. Use for any task management, todo lists, or when the user mentions tasks, todos, or todo.txt. Requires Python 3 and pip. Works on macOS, Linux, and Windows.
14swift-review
>
5