The command is to turn the [tab] key into the SPACEBAR:
[Email protected] ~]# expand [-T]fileoptions and Parameters:-T: Numbers can be followed. In general, a TAB key can be used8a space bar to replace the key. We can also define by ourselves how many characters a [tab] key represents! Example one: to/etc/Mans. config expert first for MANPATH, take the first three lines; [Email protected]~]#grep '^manpath'/etc/Mans. config |Head-N3MANPATH/usr/MansMANPATH/usr/share/MansMANPATH/usr/local/Mans# The symbol at the beginning of the line is^, we'll leave it to the next section! First, the concept can be! Example two: If I want to list all the symbols? (WithCat) [[email protected]~]#grep '^manpath'/etc/Mans. config |Head-N3|Cat-Amanpath^i/usr/Mans$MANPATH^i/usr/share/Mans$MANPATH^i/usr/local/MansDid $# find the difference? Yes ~ [tab] button can beCat-a display becomes ^I example three: bearing, I will [tab] button configured to6characters in a word? [[Email protected]~]#grep '^manpath'/etc/Mans. config |Head-N3| > expand-t6- |Cat-Amanpath/usr/Mans$MANPATH/usr/share/Mans$MANPATH/usr/local/Mans$123456123456123456... # Take a closer look at the numbers above, because I'm6character to represent the length of a [tab], so, # man ... to the/usr will be isolated between A(two [tab]) characters Fu Yi! If tab is changed to9, it's a different story! Here is also not good understanding ~ You can configure a few more numbers to check it!
Expand is also very fun ~ He will automatically turn [tab] into the space bar ~ So, in the above example, the use of cat-a will not find the ^i word Fu Yi ~ In addition, because [tab] The biggest function is the format neatly arranged! We turn into the space bar, the space bar will also be based on our own definition to add size ~ So, not a ^i will be replaced by 8 blank Oh! Pay special attention to this place! In addition, you can also refer to unexpand this blank to [tab] Command function Ah! ^_^
Reference:Http://vbird.dic.ksu.edu.tw/linux_basic/0320bash.php#expand