unexpand

standard UNIX utility

Uses your system voice; voice and rate in settings.

Q4052379Snapshot

≈ 1 min read

Names in other languages

  • Češtinaunexpand
  • Englishunexpand
  • EspañolUnexpand
  • FrançaisUnexpand
  • ItalianoUnexpand
  • PortuguêsUnexpand
  • RomânăUnexpand
  • Русскийunexpand

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

unexpand is a shell command that converts space characters to tab characters. Originally, developed for Unix and standardized by POSIX, it is available on many operating systems today. In the following commands, the echo command prints a string of text that includes multiple consecutive spaces.

The output is directed into . The resulting output is displayed as octal via od . At the second prompt, the same echo output is sent directly to .

As shown, converts each sequence of eight spaces to a tab (printed as '\t'). $ echo " asdf sdf" | unexpand | od -c 0000000 \t \t a s d f s d f \n 0000014 $ echo " asdf sdf" | od -c 0000000 0000020 a s d f s d f \n 0000032

See also

List of POSIX commands Expand (Unix)

The program's manpage

Text derived from https://en.wikipedia.org/w/index.php?oldid=1326004648 under CC BY-SA 4.0; modifications have been made.

Provenance

snapshot unexpand-464691-c086acb7803edebd · hash c086acb7803edebd72cfff08dc6807a885debdc2dd2b7d6c471570f624e254a0 · captured 1765027246.0 · version history

Cite this page as: encyclopegia.org, “unexpand”, snapshot unexpand-464691-c086acb7803edebd. https://encyclopegia.org/a/unexpand

Sources cited in this revision

No external citation was extracted for this revision. That is a statement about the source, not a claim that none exists.