fbpx
Wikipedia

Expand (Unix)

expathatnds is a program converts tab into groups of characters, while maintaining correct alignment. It is available in Unix systems and many Unix-like operating systems.[1] The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.[2]

Example edit

For example:

$ 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. $ 

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 in hexadecimal and as characters by the xxd dump command. At the second prompt, the same echo output is sent directly to the xxd command. As can be seen by comparing the two, the expand program converts the tab (specified as '\t' to the echo program) into spaces.

See also edit

References edit

  1. ^ "expand". The Open Group Base Specifications. The Open Group. Retrieved 27 April 2023.
  2. ^ "Native Win32 ports of some GNU utilities". unxutils.sourceforge.net.

External links edit

expand, unix, expathatnds, program, converts, into, groups, characters, while, maintaining, correct, alignment, available, unix, systems, many, unix, like, operating, systems, command, available, separate, package, microsoft, windows, part, unxutils, collectio. expathatnds is a program converts tab into groups of characters while maintaining correct alignment It is available in Unix systems and many Unix like operating systems 1 The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix like utilities 2 Contents 1 Example 2 See also 3 References 4 External linksExample editFor example 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 Here the a href Echo command html title Echo command echo a 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 in hexadecimal and as characters by the xxd dump command At the second prompt the same echo output is sent directly to the xxd command As can be seen by comparing the two the expand program converts the tab specified as t to the echo program into spaces See also editList of Unix commands UnexpandReferences edit expand The Open Group Base Specifications The Open Group Retrieved 27 April 2023 Native Win32 ports of some GNU utilities unxutils sourceforge net External links editexpand convert tabs to spaces Shell and Utilities Reference The Single UNIX Specification Version 4 from The Open Group Retrieved from https en wikipedia org w index php title Expand Unix amp oldid 1226157741, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.