<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic java command and grep on output in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/java-command-and-grep-on-output/m-p/5213055#M51465</link>
    <description>Hello&lt;BR /&gt;&lt;BR /&gt;I'd like to save the result of a java ksh command. This command normally show something likke that:&lt;BR /&gt;&lt;BR /&gt;java.sql.SQLException: ORA-01017: invalid username/password; logon denied&lt;BR /&gt;&lt;BR /&gt;        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)&lt;BR /&gt;        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)&lt;BR /&gt;        at oracle.jdbc.driver.T4CTTIoer.processErr&lt;BR /&gt;&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example: java -jar test.jar | tee -a /tmp/test.tmp&lt;BR /&gt;&lt;BR /&gt;The full result comes on screen but no lines in the /tmp file. &lt;BR /&gt;&lt;BR /&gt;why ? &lt;BR /&gt;I think that it's somewhere a problem with standard output but how to do the trick !&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;Bests Regards&lt;BR /&gt;Den</description>
    <pubDate>Mon, 07 Dec 2009 16:22:49 GMT</pubDate>
    <dc:creator>Leo The Cat</dc:creator>
    <dc:date>2009-12-07T16:22:49Z</dc:date>
    <item>
      <title>java command and grep on output</title>
      <link>https://community.hpe.com/t5/operating-system-linux/java-command-and-grep-on-output/m-p/5213055#M51465</link>
      <description>Hello&lt;BR /&gt;&lt;BR /&gt;I'd like to save the result of a java ksh command. This command normally show something likke that:&lt;BR /&gt;&lt;BR /&gt;java.sql.SQLException: ORA-01017: invalid username/password; logon denied&lt;BR /&gt;&lt;BR /&gt;        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)&lt;BR /&gt;        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)&lt;BR /&gt;        at oracle.jdbc.driver.T4CTTIoer.processErr&lt;BR /&gt;&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example: java -jar test.jar | tee -a /tmp/test.tmp&lt;BR /&gt;&lt;BR /&gt;The full result comes on screen but no lines in the /tmp file. &lt;BR /&gt;&lt;BR /&gt;why ? &lt;BR /&gt;I think that it's somewhere a problem with standard output but how to do the trick !&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;Bests Regards&lt;BR /&gt;Den</description>
      <pubDate>Mon, 07 Dec 2009 16:22:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/java-command-and-grep-on-output/m-p/5213055#M51465</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2009-12-07T16:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: java command and grep on output</title>
      <link>https://community.hpe.com/t5/operating-system-linux/java-command-and-grep-on-output/m-p/5213056#M51466</link>
      <description>Perhaps the missing messages are not sent to standard output stream (stdout, file descriptor #1), but to standard error stream (stderr, file descriptor #2).&lt;BR /&gt;&lt;BR /&gt;If you wish to capture both, try a command like:&lt;BR /&gt;&lt;BR /&gt;java -jar test.jar 2&amp;gt;&amp;amp;1 | tee -a /tmp/test.tmp&lt;BR /&gt;&lt;BR /&gt;The "2&amp;gt;&amp;amp;1" merges the standard error stream to the output stream, so that the content of both streams can be received by the pipe.&lt;BR /&gt;&lt;BR /&gt;(Nitpick: "java" is not a ksh command, as it is not specific to ksh in any way, nor built in to it. It's a wholly independent program binary, more specifically a Java bytecode interpreter/JIT compiler. It is most commonly known as JVM = Java Virtual Machine.)&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Mon, 07 Dec 2009 17:12:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/java-command-and-grep-on-output/m-p/5213056#M51466</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2009-12-07T17:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: java command and grep on output</title>
      <link>https://community.hpe.com/t5/operating-system-linux/java-command-and-grep-on-output/m-p/5213057#M51467</link>
      <description>Thanks Matti, efficient answer !</description>
      <pubDate>Mon, 07 Dec 2009 18:32:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/java-command-and-grep-on-output/m-p/5213057#M51467</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2009-12-07T18:32:45Z</dc:date>
    </item>
  </channel>
</rss>

