- 论坛徽章:
- 0
|
newbie shell question..??
原帖由 "kinux"][quote:d3fa4e13e9="nmgzw" 发表:
tr -s ' ' ' ' < lotsaspaces and tr -s ' ' ' < lotsaspaces
这一行我没看明白,不知道那些引号是单引号还是但引号包含的双引号,还是单引号里边包含的许多空格呢?可能是我的显示问题吧!
tr -s ' ' ' ' ..........
引号之間是Space, 不是双引号...
thx[/quote]
tr -s ' ' ' ' < lotsaspaces
-s replace instances of repeated characters with a single character.
hence after running this command, only single space left in the text file lotsaspace.
tr -s ' ' ' < lotsaspaces
is it a typo? seems should be
tr -s ' ' '' < lotsaspaces
it takes same effect, althogh there is no space between the second quote pair. |
|