expand

QNX SDP8.0Utilities ReferenceUtilities

Convert tabs to spaces according to tab stops (POSIX, toybox)

Syntax:

expand [-ttablist] [file...]

Runs on:

QNX OS

Options:

-t tablist
Set up tab stops according to the tablist argument. This argument consists either of a single positive decimal integer, or of multiple positive decimal integers, in ascending order, separated by single commas.
If no number is given, tab stops are set eight columns apart. If a single number is given, tab stops are set tablist columns apart. If multiple numbers are given, tab stops are set at those columns.
file
The pathname of a file whose tabs are to be converted.

Description:

The expand utility copies files or the standard input to the standard output with tab characters replaced by the number of spaces needed to pad to the next tab stop.

The -t option lets you specify how many columns tab stops are set apart. You can also use it to specify a multiple tab-stop list that determines where tab stops are placed. If tab characters are present in the input past the last tab stop specified in a multiple tab-stop list, those tabs are each replaced by a single space in the output.

This utility is provided as part of the toybox package. For information on how to enable it, see toybox.

Contributing author:

Rob Landley and the toybox project (see https://landley.net/toybox/).

Page updated: