bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Inconvenience in unexpand command


From: 北川 哲平
Subject: Inconvenience in unexpand command
Date: Fri, 14 Apr 2006 16:52:07 +0900 (JST)

"unexpand" command converts tab-stop, which is single
space  apart, to a single space. I felt it might be
inconvenient when I used "unexpand" with "cut".

for example, I made a testfile.txt and wrote

aaaaaa  bbbbbb  /*use tab that is double space apart*/
aaaaaa  bbbbbb  /*use double spaces*/
aaaaaaa bbbbbbb /*use tab that is single space apart*/
aaaaaaa bbbbbbb /*use single space*/

I've tried "unexpand -a testfile.txt | cut -s -f2-" and
expected the output would be like

bbbbbb  /*use tab that is double space apart*/
bbbbbb  /*use double spaces*/
bbbbbbb /*use tab that is single space apart*/

However, the actual output was

bbbbbb  /*use tab that is double space apart*/
bbbbbb  /*use double spaces*/

Because the "unexpand" converted double spaces to a tab
and converted a tab to single space, and the "cut" command
cut every 2nd field from every lines deviding by
delimiter, which is tab.

My test case would not be usefull,but I think it is not
nessesary to convert every tabs that is single space
apart, to single space.


Thanks regarding.

Teppei Kitagawa

--------------------------------------
Celebrate Yahoo! JAPAN 10th Anniversary
http://pr.mail.yahoo.co.jp/10thann/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]