You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Benson Margulies <be...@basistech.com> on 2016/05/17 17:31:46 UTC

Can't use 'tac' to capture output of alias with many commands

'licenses' is an alias that runs a series of bundle commands.

Is this surprising? Should I make a jira?


karaf@root>licenses | tac -f /tmp/licenses.txt
2016-05-17 10:30:21,226 | ERROR | nsole user karaf | ShellUtil
               | 174 - org.apache.karaf.shell.core - 4.0.4 | Exception
caught while executing command
java.io.IOException: Write end dead
at java.io.PipedInputStream.read(PipedInputStream.java:310)[:1.8.0_60]
at java.io.PipedInputStream.read(PipedInputStream.java:377)[:1.8.0_60]
at org.apache.felix.gogo.runtime.threadio.ThreadInputStream.read(ThreadInputStream.java:67)[174:org.apache.karaf.shell.core:4.0.4]
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)[:1.8.0_60]
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)[:1.8.0_60]
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)[:1.8.0_60]
at java.io.InputStreamReader.read(InputStreamReader.java:184)[:1.8.0_60]
at java.io.BufferedReader.fill(BufferedReader.java:161)[:1.8.0_60]
at java.io.BufferedReader.readLine(BufferedReader.java:324)[:1.8.0_60]
at java.io.BufferedReader.readLine(BufferedReader.java:389)[:1.8.0_60]
at org.apache.karaf.shell.commands.impl.TacAction.execute(TacAction.java:70)[172:org.apache.karaf.shell.commands:4.0.4]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[174:org.apache.karaf.shell.core:4.0.4]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[174:org.apache.karaf.shell.core:4.0.4]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[174:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[174:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[174:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[174:org.apache.karaf.shell.core:4.0.4]