[Spacewalk-list] Spacecmd - strangeness on piping

Parsons, Aron parsonsa at bit-sys.com
Wed Aug 29 16:03:19 UTC 2012


Python allowed a fairly elegant solution.  Fixed in 90b55fb528bfd7b00556445010dea62a22f58899.

/aron

-----Original Message-----
Date: Wed, 29 Aug 2012 09:39:50 +0200
From: Michael Mraka <michael.mraka at redhat.com>
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] Spacecmd - strangeness on piping
Message-ID: <20120829073950.GB3179 at magni.redhat.com>
Content-Type: text/plain; charset=utf-8

Jonathan Hoser wrote:
% Hi all,
%
% I'm using spacecmd in a few places and I noticed a strangeness, that I % wanted to ask you guys about.
% I'm still running spacewalk-1.6 (on postgres) on a Fedora16 box, maybe % thats the issue, but then it might not:
%
% running something like
% spacecmd -q softwarechannel_listsystems fedora16-x86_64 % produces a nice-enough list - just as I expect it:
% hias.mydomain.de
% ibis111.mydomain.de
% ibis138.[...]
%
% however, writing that list into a file % spacecmd -q softwarechannel_listsystems fedora16-x86_64 > /tmp/f16.txt % % results in a few bad characters written in the beginning of the file:
% ^[[?1034hhias.mydomain.de
% ibis111.mydomain.de
% ibis138...[...]
%
% Where does that strange string "^[[?1034h" come from? It's pretty % consistent across all pipes of spacecmd that I'm using, % and its quite irritating, since I haven't been able to discover the why, % where, and hms? about it.

Hi Jonathan,
It's probably readline library leaking terminal escape sequence to stdout.
See https://bugzilla.redhat.com/show_bug.cgi?id=304181.
I'm not sure how to fix / workaround it.

Regards,

--
Michael Mr?ka
Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list