expand (Unix)
Page Module:Infobox/styles.css has no content.
| expand | |
|---|---|
| Operating system | Unix and Unix-like |
| Platform | Cross-platform |
| Type | Command |
| Website | Script error: No such module "WikidataIB". |
Script error: No such module "Check for conflicting parameters".
expand is a shell command that converts tab characters to space characters while maintaining vertical alignment. Originally, developed for Unix and standardized by POSIX, it is available on many operating systems today.[1] The command is available as a separate package for Windows via UnxUtils.[2]
In the following commands, the echo command prints a string of text that includes a tab character, then the output is directed into expand. The resulting output is displayed in hexadecimal and as characters by xxd (dump). At the second prompt, the same echo output is sent directly to xxd. As shown, expand converts the tab (specified as '\t') into spaces.
$ echo -e "foo\tbar" | expand | xxd -g 1 -u
0000000: 66 6F 6F 20 20 20 20 20 62 61 72 0A foo bar.
$ echo -e "foo\tbar" | xxd -g 1 -u
0000000: 66 6F 6F 09 62 61 72 0A foo.bar.
See also
References
Page Template:Reflist/styles.css has no content.
- ^ Page Module:Citation/CS1/styles.css has no content."expand". The Open Group Base Specifications. The Open Group. Retrieved 27 April 2023.
- ^ Page Module:Citation/CS1/styles.css has no content."Native Win32 ports of some GNU utilities". unxutils.sourceforge.net.
External links
Lua error in package.lua at line 80: module 'Module:Navbox/configuration' not found. Template:Core Utilities commands