[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
unexpand -t4 converts too much whitespace to tabs
From: |
Charles Karney |
Subject: |
unexpand -t4 converts too much whitespace to tabs |
Date: |
Sat, 19 Jul 2003 09:44:00 -0400 |
Problem
The documentation for unexpand claims
* that only initial whitespace is converted (unless -a is given)
* that only sequences of 2 or more spaces are converted
Neither of these is true for nondefault tab settings.
Configuration
unexpand (textutils) 2.0.21
RedHat Linux 8.0
RPM textutils-2.0.21-5
Repeat with...
Interior white space is converted in this example
$ echo 'a b' | unexpand -t4 | tr '\t' X
aXb
A single space is converted in this example
$ echo 'aaa b' | unexpand -t4 -a | tr '\t' X
aaaX b
--
Charles Karney Email: address@hidden
Sarnoff Corporation Phone: +1 609 734 2312
Princeton, NJ 08543-5300 Fax: +1 609 734 2323
- unexpand -t4 converts too much whitespace to tabs,
Charles Karney <=