FENIX_coreutils/expand.1

59 lines
1.4 KiB
Groff
Raw Normal View History

2020-12-02 02:31:04 +00:00
.TH EXPAND 1
.SH NAME
expand \- convert tabs to spaces
.SH SYNOPSIS
.B expand
[\fB\-t\fR \fItablist\fR]
.IR file ...
.SH DESCRIPTION
.B expand
writes files to the standard output with any <tab> characters
replaced with one or more <space> characters to pad to the next tab
stop. By default, there is a tab stop every 8 characters.
.SH OPTIONS
.TP
.BR -t " " \fItablist\FR
Takes in one or more space-separated numbers to set the number of
spaces between each tab stop.
.SH EXAMPLES
.nf
.RS
expand file
.RE
.fi
.PP
replaces <tab> characters in file with enough <space> characters to
pad to a tab stop every 8 columns.
.PP
.nf
.RS
expand -t 10 file
.RE
.fi
.PP
replaces <tab> characters in file with enough <space> characters to
pad to a tab stop every 10 columns.
.PP
.nf
.RS
expand -t 10 5 8 file
.RE
.fi
.PP
replaces the first <tab> in every line of file with enough <space>
characters to pad to a tab stop on column 10, the second <tab> with
enough <space> characters to pad to a tab stop 5 columns after the
first tab stop, then the third <tab> with enough <space> characters
to pad to a tab stop 8 columns after the second tab stop. Any
further <tab> characters on a line will be replaced with a single
<space>.
.SH AUTHOR
Written by Kat.
.SH COPYRIGHT
Copyright (C) 2019 Katlynn Richey
.PP
This software is free software. Feel free to modify it and/or pass
it around.
.PP
This \fBexpand\fR implementation is a part of the fenutils package.