printf
Installation
SKILL.md
printf
Produce formatted output portably across all POSIX shells. Prefer printf
over echo in scripts whenever escape sequences, format strings, or
cross-shell portability matter.
Quick Start
- Basic output:
printf '%s\n' "Hello, world" - Formatted:
printf '%-20s %d\n' "count:" 42 - Write to file:
printf '%s\n' "content" > file.txt
Intent Router
references/cheatsheet.md— Format specifiers, escape sequences, field widths, common invocationsreferences/advanced-usage.md— Multiline output, ANSI colour, heredoc alternatives, null-delimited pipelines, scripting patternsreferences/troubleshooting.md—%in variables, portability pitfalls, locale issues, cross-shell differences