Bug 896447 - No newlines in piped "cal" command
Summary: No newlines in piped "cal" command
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 18
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 901935 905079 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-17 10:35 UTC by Jan ONDREJ
Modified: 2013-02-08 02:21 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-02-08 02:21:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan ONDREJ 2013-01-17 10:35:05 UTC
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 17:53:54 UTC
Fixed by upstream commit e66ba1bfaf070682e26c1a53e64af1088fea56bc,fedora package will be updated ASAP.

Thanks!

Comment 2 Karel Zak 2013-01-26 19:55:02 UTC
*** Bug 901935 has been marked as a duplicate of this bug. ***

Comment 3 Karel Zak 2013-01-29 15:49:55 UTC
*** Bug 905079 has been marked as a duplicate of this bug. ***

Comment 4 Jonathan Kamens 2013-01-31 18:56:43 UTC
Define "ASAP". 14 days and counting. Please fix.

Comment 5 Guido 2013-01-31 20:33:20 UTC
Me too. Still looking for that elusive update in cal | ncurses | ?

Comment 6 Jan ONDREJ 2013-01-31 20:40:35 UTC
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 20:55:17 UTC
Well, if we're posting workarounds...

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

:-)

Comment 8 Solomon Peachy 2013-02-01 03:56:49 UTC
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 12:16:56 UTC
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 12:50:11 UTC
It uses curses to highlight the current day.

Comment 11 Peter Scott 2013-02-01 13:45:55 UTC
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 16:16:09 UTC
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 16:19:35 UTC
Sorry for the delay, I was ill last week...

Comment 14 Solomon Peachy 2013-02-04 23:55:17 UTC
util-linux-2.22.2-3.fc18 works for me, thank you.  I've added positive karma.

Comment 15 Fedora Update System 2013-02-05 03:09:29 UTC
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-08 02:21:08 UTC
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.