[Top][All Lists]

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

Re: textutils 2.[01]: "fmt --prefix=TAB" doesn't work

From: Haakon Riiser
Subject: Re: textutils 2.[01]: "fmt --prefix=TAB" doesn't work
Date: Sun, 30 Mar 2003 01:15:20 +0100
User-agent: Mutt/1.4i


>> Steps to reproduce:
>>   $ fmt --prefix=TAB <<EOF
>>   TABfoo
>>   TABbar
>>   EOF
>> The correct output should be
>>   TABfoo bar
>> but fmt returns
>>   foo
>>   bar

> Thanks for that very nicely crafted example.  But I can't
> reproduce the problem using either the older fmt from textutils
> or the fmt from the newest coreutils.  It works for me.

It's almost insulting to suggest this, but are you sure you
entered the TABs correctly?  For example, one could easily be
confused by trying something like this:

  --prefix=`printf '\t'`

which, because back quotes are not implicitly double quoted,
is equivalent to


which happens to work the way --prefix=TAB is /supposed/ to work,
since fmt defaults to preserving indentation when no prefix is
given. :-) Here's a sure way to reproduce to the bug:

  $ printf '\tfoo\n\tbar\n' | fmt --prefix="`printf '\t'`"

(Note the double quotes around `printf '\t'`)

> What version of fmt are you using?

I've tried several versions of GNU textutils:

  2.1 built using default ./configure options on Red Hat 7.2
  2.1 built using default ./configure options on SunOS 5.8
  2.0 built using default ./configure options on SunOS 5.8
  1.22 built using default ./configure options on Red Hat 7.2

And then there's the pre-installed distribution binaries:

  2.0.14 included with Red Hat 7.2 (RPM: textutils-2.0.14-2)
  2.0 included with Slackware 9.0 

They all have the same bug.

> If possible could you try one of the newer versions?  Please try
> the latest version you find here.
>   ftp://alpha.gnu.org/gnu/coreutils/
>   (coreutils is the union of fileutils, textutils, and sh-utils)

Tried coreutils 4.5.11 on Red Hat 7.2 just now.  The bug is
still there.


reply via email to

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