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..
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.
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.
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.
I'm unable to reproduce the bug.