[Top][All Lists]

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

bug#9023: pr command does not honor -f or --form-feed option

From: Jim Meyering
Subject: bug#9023: pr command does not honor -f or --form-feed option
Date: Sun, 10 Jul 2011 12:51:34 +0200

Jim Meyering wrote:
> Jim Meyering wrote:
>> Conklin,Paul W. wrote:
>>> I think that I have found a bug with the pr command
>>> Version Info
>>> pr 5.97                          October 2008                            
>>> PR(1)
>> Thank you for the report.
>> I confirm that GNU pr (even the latest, from coreutils-8.12)
>> is not compatible with the pr from Solaris 10:
>>     solaris$ seq 9|/usr/bin/pr -t -f -l3|grep -c '^L'
>>     3
>>     solaris$ seq 9|pr -t -f -l3|grep -c '^L'
>>     0
>> The source of pr is the ugliest and least maintainable (by far) in coreutils,
>> but we have decent test coverage for it, so we should be able to fix this 
>> soon.
> For the record, NetBSD 5.0.2's pr supports -F but not -f,
> and its -F behavior matches that of GNU pr:
>     netbsd$ seq 9|/usr/bin/pr -t -F -l3|cat -A
>     1$
>     2$
>     3$
>     4$
>     5$
>     6$
>     7$
>     8$
>     9$
> However, on FreeBSD 8.2, OpenBSD 4.7, darwin 10.8 and SunOS 5.11
> the vendor pr behavior matches that of AIX and solaris-10.

Actually, consider the POSIX spec for pr.
Its description of the -t option says this:

-t      Write neither the five-line identifying header nor the five-line
        trailer usually supplied for each page. Quit writing after the
        last line of each file without spacing to the end of the page.

Which I interpret as meaning pr should write neither those spaces
(the default trailer) nor the replacement formfeed that you get with -f.

So, unless we get an interpretation from the POSIX folks
that says otherwise, I'll leave GNU pr the way it is.
I've marked this issue as "done" for now, but you're welcome to reopen it.

reply via email to

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