expand
convert tab characters to spaces in text files
TLDR
Convert tabs to spaces
SYNOPSIS
expand [options] [files...]
DESCRIPTION
expand converts tab characters to spaces. It's commonly used to normalize text files for consistent display or before processing by tools that don't handle tabs well.
By default, tabs expand to 8-space intervals. Custom tab widths or specific tab stop positions can be set. The --initial option only converts tabs at line beginnings.
expand is the inverse of unexpand, which converts spaces to tabs.
PARAMETERS
FILES
Files to process (stdin if none).-t N
Tab width (default: 8).-t LIST
Comma-separated tab stops.-i, --initial
Only convert leading tabs.--help
Display help information.
CAVEATS
Changes file content permanently if redirected. Tab interpretation is contextual. Binary files may be corrupted. Original tabs unrecoverable.
HISTORY
expand is a classic Unix utility from the early BSD distribution, providing tab-to-space conversion for text processing pipelines.
