Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ unexpand(1) — OSF/1 1.0 (TIN) MIPS

Media Vault

Software Library

Restoration Projects

Artifacts Sought

expand(1)  —  Commands

OSF

NAME

expand, unexpand − Replaces tab characters with spaces or spaces with tab characters

SYNOPSIS

expand [-tabstop | -tab1,tab2,...,tabn] [file ...]

unexpand [-a] [file ...]

The expand command changes tab characters to spaces in the named files, or the standard input, and writes the result to the standard output. 

The unexpand command puts tab characters back into the data from the standard input, or the named files, and writes the result to the standard output. 

FLAGS

-tabstop (expand)
Sets tab stops tabstop spaces apart instead of the default (8). 

-tab1, tab2, ..., tabn (expand)
Sets tab stops at specified columns.  Columns are measured in bytes.

-a (unexpand)
Inserts tab characters wherever their presence compresses the resultant file by replacing two or more characters.

DESCRIPTION

Backspace characters are preserved in the output and decrement the column count for tab calculations.  expand is useful for preprocessing character files (before sorting, looking at specific columns, and so on.)  that contain tab characters. 

By default, unexpand converts only spaces that are within sequences of spaces and tab characters at the beginnings of lines.  Use -a to convert other sequences of spaces. 

Japanese Language Support

If Japanese Language Support is enabled on your system, these commands are not available. 

EXAMPLES

     1.To replace tab characters in file with spaces, enter:

expand file

     2.To replace the spaces in file with tab characters, enter:

unexpand -a file

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026