GNU bug report logs - #13786
pr command does not fold

Previous Next

Package: coreutils;

Reported by: Doh Smith <doh.smith <at> gmail.com>

Date: Fri, 22 Feb 2013 17:13:01 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #13 received at control <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Doh Smith <doh.smith <at> gmail.com>
Cc: 13786 <at> debbugs.gnu.org
Subject: Re: bug#13786: pr command does not fold
Date: Fri, 22 Feb 2013 23:17:39 +0000
tag 13786 notabug
close 13786
stop

On 02/22/2013 10:14 AM, Doh Smith wrote:
> Hi,
>
> I could not get the pr command to fold the lines. Is this a bug?
>
> I am using pr (GNU coreutils) 8.13 under GNU bash 4.2.24.
>
> Here is an example - the following pr command produced an output that
> instead of folding a long line of text in the first column, it cuts it off:
>
> $ echo "Snow with areas of blowing snow.  Low around 24. East wind around
> 15 mph, with gusts as high as 25 mph.  Chance of precipitation is 100%.
> Total nighttime snow accumulation of 2 to 4 inches possible." | pr -F
> --columns=2
>
> 2013-02-22 04:08                                                  Page 1
>
>
> Snow with areas of blowing snow.  L

fold or fmt are used to wrap text.
It can then be passed on to pr for
further layout and truncation:
You can paste this command to a terminal for illustration:

for i in $(seq 22); do
  clear
  seq -f '%03.f' 1 $i |
  fmt -w20 |
  pr -t -c2 -w40 -s'|'
  sleep 1
done

thanks,
Pádraig.




This bug report was last modified 12 years and 94 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.