Re: fooling a non-"stdin redirection accepting" app (colortail)??
On 11/24/12, Sven Joachim <email@example.com> wrote:
> On 2012-11-24 08:59 +0100, Zenaan Harkness wrote:
>> colortail is not a full replacement for tail - namely, it precludes
>> systemd-journalctl -f gives a non colorized output.
>> Here's my failed attempt to fool colortail into accepting a bash file
>> descriptor in order to pipe journal through colortail:
>> Refer: http://www.tldp.org/LDP/abs/html/io-redirection.html
> For programs which do not read standard input,
> http://www.tldp.org/LDP/abs/html/process-sub.html is more interesting.
> See also the "Process Substitution" paragraph in the bash manpage.
Great links, thanks! I shall read them, since:
>> SO, it comes to my mind, that there ought be a way to turn a bash file
>> descriptor, into a file name, to fool colortail in some other way.
>> Perhaps a /proc/$PID/fd/... or some such.
> Exactly that is what process substitution achieves.
>> Anyone know where to next, in the search for ultimate control over
>> colortail, taming it into submission to the will of systemd-journald?
> Probably "colortail -f <(systemd-journalctl -f)" will do the trick.
This doesn't work - I guess "<" is still a redirection to stdin or something.
For colortail, we need to auto-generate the corresponding filename for stdin.
I shall report back if/when I find a solution...