This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 896447 - No newlines in piped "cal" command
No newlines in piped "cal" command
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
18
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Karel Zak
Fedora Extras Quality Assurance
:
: 901935 905079 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-17 05:35 EST by Jan ONDREJ
Modified: 2013-02-07 21:21 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-07 21:21:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jan ONDREJ 2013-01-17 05:35:05 EST
Description of problem:
This is a regression, worked well in Fedora 17. I am not sure, if this is a bug of cal or ncurses.

Version-Release number of selected component (if applicable):
util-linux-2.22.1-2.4.fc18.x86_64
ncurses-5.9-7.20121017.fc18.x86_64

How reproducible:
always

Steps to Reproduce:
1. cal | cat
  
Actual results:
    January 2013    Su Mo Tu We Th Fr Sa       1  2  3  4  5 6  7  8  9 10 11 1213 14 15 16 17 18 1920 21 22 23 24 25 2627 28 29 30 31








Expected results:
    January 2013    
Su Mo Tu We Th Fr Sa
       1  2  3  4  5
 6  7  8  9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

Additional info:
As you see, newlines are present, but not properly written between text, but they are at end of text.
Comment 1 Karel Zak 2013-01-17 12:53:54 EST
Fixed by upstream commit e66ba1bfaf070682e26c1a53e64af1088fea56bc,fedora package will be updated ASAP.

Thanks!
Comment 2 Karel Zak 2013-01-26 14:55:02 EST
*** Bug 901935 has been marked as a duplicate of this bug. ***
Comment 3 Karel Zak 2013-01-29 10:49:55 EST
*** Bug 905079 has been marked as a duplicate of this bug. ***
Comment 4 Jonathan Kamens 2013-01-31 13:56:43 EST
Define "ASAP". 14 days and counting. Please fix.
Comment 5 Guido 2013-01-31 15:33:20 EST
Me too. Still looking for that elusive update in cal | ncurses | ?
Comment 6 Jan ONDREJ 2013-01-31 15:40:35 EST
For those who needs a workaround, Karel suggested this:

script -qc "cal" /dev/null | cat

Works for me until it will be fixed in Fedora.
Comment 7 Jonathan Kamens 2013-01-31 15:55:17 EST
Well, if we're posting workarounds...

expect -c 'log_user 0; spawn cal 2 2013; interact;'

:-)
Comment 8 Solomon Peachy 2013-01-31 22:56:49 EST
This is what I'm using:

script -qc "cal $*" /dev/null | perl -pe 's/\x{1b}\[.*m// ;'

The perl expression strips off the escape sequence that highlights today's date.

There really should be an option to disable that...
Comment 9 Peter Scott 2013-02-01 07:16:56 EST
Why should cal need to use ncurses? It used to generate its output left to right, top to bottom. It should still work on a paper teletype.
Comment 10 Jonathan Kamens 2013-02-01 07:50:11 EST
It uses curses to highlight the current day.
Comment 11 Peter Scott 2013-02-01 08:45:55 EST
It just seems a bit of sledgehammer to have the whole program in curses mode merely to turn highlighting on and off around the current day.
Comment 12 Fedora Update System 2013-02-03 11:16:09 EST
util-linux-2.22.2-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/util-linux-2.22.2-3.fc18
Comment 13 Karel Zak 2013-02-03 11:19:35 EST
Sorry for the delay, I was ill last week...
Comment 14 Solomon Peachy 2013-02-04 18:55:17 EST
util-linux-2.22.2-3.fc18 works for me, thank you.  I've added positive karma.
Comment 15 Fedora Update System 2013-02-04 22:09:29 EST
Package util-linux-2.22.2-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing util-linux-2.22.2-3.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1934/util-linux-2.22.2-3.fc18
then log in and leave karma (feedback).
Comment 16 Fedora Update System 2013-02-07 21:21:08 EST
util-linux-2.22.2-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.