<?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 Re: Remove errors at command line in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253862#M714828</link>
    <description># diff file1 file2 2 &amp;gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;-Hazem</description>
    <pubDate>Tue, 20 Apr 2004 11:37:45 GMT</pubDate>
    <dc:creator>Hazem Mahmoud_3</dc:creator>
    <dc:date>2004-04-20T11:37:45Z</dc:date>
    <item>
      <title>Remove errors at command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253858#M714824</link>
      <description>i am doing a diff between 2 files if the file does not exists it gives error message on command line i want to remove it &lt;BR /&gt;diff:  No such file or directory&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 11:31:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253858#M714824</guid>
      <dc:creator>Vanquish</dc:creator>
      <dc:date>2004-04-20T11:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Remove errors at command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253859#M714825</link>
      <description>add 2&amp;gt;/dev/null to the end of your diff command. &lt;BR /&gt;&lt;BR /&gt;example&lt;BR /&gt;&lt;BR /&gt;diff file1 file2 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 11:34:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253859#M714825</guid>
      <dc:creator>Marvin Strong</dc:creator>
      <dc:date>2004-04-20T11:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Remove errors at command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253860#M714826</link>
      <description>Easy answer :&lt;BR /&gt;diff file1 file2 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;and the error messages going to "trashcan".&lt;BR /&gt;&lt;BR /&gt;Juergen</description>
      <pubDate>Tue, 20 Apr 2004 11:34:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253860#M714826</guid>
      <dc:creator>Juergen Tappe</dc:creator>
      <dc:date>2004-04-20T11:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Remove errors at command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253861#M714827</link>
      <description>That error message goers to stderr (like good UNIX programs should) while the normal output goes to stdout. The solution is simple:&lt;BR /&gt;&lt;BR /&gt;diff file1 file2 2&amp;gt;/dev/null&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 11:34:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253861#M714827</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-04-20T11:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Remove errors at command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253862#M714828</link>
      <description># diff file1 file2 2 &amp;gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;-Hazem</description>
      <pubDate>Tue, 20 Apr 2004 11:37:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253862#M714828</guid>
      <dc:creator>Hazem Mahmoud_3</dc:creator>
      <dc:date>2004-04-20T11:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Remove errors at command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253863#M714829</link>
      <description>I should add that there is a danger to ignoring the error message. It now is not possible to distinguish between two files which match exactly (ie no diff) and a missing file. Both cases will result in no output to stdout. You need to now check the status of the diff command as well as examine stdout. Diff will return a non-zero exit status on failure.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;diff file1 file2 2&amp;gt;/dev/null &amp;gt; difffile&lt;BR /&gt;STAT=${?}&lt;BR /&gt;if [[ ${STAT} -ne 0 ]]&lt;BR /&gt;then&lt;BR /&gt;  echo "Diff failed. Status = ${STAT}"&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 11:52:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253863#M714829</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-04-20T11:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Remove errors at command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253864#M714830</link>
      <description>&lt;BR /&gt;From a Shell Script:&lt;BR /&gt;&lt;BR /&gt;if&lt;BR /&gt;  [ -f file1 -a  -f file2 ]&lt;BR /&gt;then&lt;BR /&gt;  diff  file1 file2&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Suggest if you want from a command line:&lt;BR /&gt;1.  make a function in .profile&lt;BR /&gt;&lt;BR /&gt;difff()&lt;BR /&gt;{&lt;BR /&gt;if&lt;BR /&gt;  [ -f $1 -a  -f $2 ]&lt;BR /&gt;then&lt;BR /&gt;  diff  $1 $2&lt;BR /&gt;fi&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;2. command line&lt;BR /&gt;difff file1 file2&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Apr 2004 10:48:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-errors-at-command-line/m-p/3253864#M714830</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2004-04-21T10:48:58Z</dc:date>
    </item>
  </channel>
</rss>

