Expand (Unix)

del.icio.us del.icio.us
Digg Digg
Furl Furl
Reddit Reddit
Rojo Rojo
Add to OnlyWire

expand is a command in the UNIX Operating System. It is used to convert groups of tabs into space characters.

For example:

$ echo -e "\t foo" | expand | od -c
0000000                                       f   o   o  \n
0000015
$ echo -e "\t foo" | od -c
0000000  \t       f   o   o  \n
0000006


Here the echo command prints a string of text that includes a tab character, then the output is directed into the expand command. The resulting output is then displayed by the octal dump command od. At the second prompt, the same echo output is sent directly through the od command. As can be seen by comparing the two, the expand program converts the tab (printed as '\t') into spaces.

See also

External links

This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.


Giant Panda

Mercedes Car
James Bond Guide
This site monitored by SitePinger.net