Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 532044 - =www-client/pybugz-0.11.1 adds strange char to the stdout
Summary: =www-client/pybugz-0.11.1 adds strange char to the stdout
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-09 10:48 UTC by Agostino Sarubbo
Modified: 2017-01-01 14:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2014-12-09 10:48:32 UTC
suppose I want to search all bugnumbers relative to the pybugz package:

ago@willoughby ~ $ bugz search www-client/pybugz | awk '{print $1}' | grep -v "\*"
524622                                                                                                                                                                                                                                                                         
531826                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                               
ago@willoughby ~ $                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                               
We apparently have a blank final line.

While I'm doing the same thing redirected in a file I have:

ago@willoughby ~ $ bugz search www-client/pybugz | awk '{print $1}' | grep -v "\*" > /tmp/pybugz
ago@willoughby ~ $ cat /tmp/pybugz                                                                                                                                                                                                                                             
524622                                                                                                                                                                                                                                                                         
531826                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                               
ago@willoughby ~ $ 

That's ok, but while I try to read this file with another editor, I see that the last is not a blank line.
Editors like scite shows me:

524622
531826
ESC[?1034h


So the summary is that I can't remove blank line because they are not really blank..
Comment 1 William Hubbs gentoo-dev 2014-12-13 18:19:17 UTC
I ran your example both with pybugz-0.11.1 and pybugz-9999, but I was
unable to reproduce the escape sequences you are seeing.
Comment 2 Jason Zaman gentoo-dev 2014-12-13 20:51:26 UTC
run this:

$ bugz search www-client/pybugz | tail -n2 | xxd
0000000: 202a 2033 2062 7567 2873 2920 666f 756e   * 3 bug(s) foun
0000010: 642e 0a1b 5b3f 3130 3334 68              d...[?1034h


0x0a is a new line, so the stuff after that is strange.
Comment 3 Agostino Sarubbo gentoo-dev 2014-12-16 10:55:49 UTC
The problem, anyway is with awk, example:

vh ~ # bugz search www-client/pybugz | sed '/^\ / d'
524622 teiresias            www-client/pybugz: test bug, please ignore
532044 williamh             =www-client/pybugz-0.11.1 adds strange char to the s
vh ~ #



vh ~ # bugz search www-client/pybugz | sed '/^\ / d' | awk '{print $1}'
524622
532044

(chroot) vh ~ # 



Only with awk I get the last strange line.
Comment 4 Agostino Sarubbo gentoo-dev 2017-01-01 14:18:50 UTC
I'm unable to reproduce the bug.