On Fri, Apr 18, 2003 at 02:07:13PM -0400, David Swasey wrote: > > Please consider changing pr -i to use a single space, rather than a > tab, in the case where one space is needed just before a tab stop. > For example, I would prefer that the output of > > echo 'donttab here' | pr -ti > > contains no tabs. One way to accomplish this is > I use "trim" which I wrote many years ago to remove trailing spaces from text files and eventually grew to convert spaces to tabs and viceversa. The attached code is for Plan 9 but needs a couple of BSDisms to compile correctly: this is the mkfile line I use: pcc -o trim -D_POSIX_SOURCE -D_BSD_EXTENSION trim.c NO man(1) page, yet, but I'm working on it. A comment of relevance to the above: ** A tab is never output if its purpose can be fulfilled by ** a single space (yes, it seems odd, but it has frustrated ** me since 1991 - it's now fixed). Trim tries to be clever about 'C' strings and leave tabs and spaces unchanged between quotes, but it would require a fancier syntax scanner to be perfect :-( ++L PS: the code is in the public domain, in the strict sense of the term.