<?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: Help in script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/help-in-script/m-p/5160245#M50449</link>
    <description>&amp;gt;MK: 4) run "diff" on the both temporary files to pick out the differences.&lt;BR /&gt;&lt;BR /&gt;You may want to run comm(1) instead of diff.&lt;BR /&gt;You will have to put the names before the checksums:&lt;BR /&gt;cksum * | awk '{print $3, $1, $2}' &amp;gt; $TMPFILE1&lt;BR /&gt;&lt;BR /&gt;Then: comm -3 $TMPFILE1 $TMPFILE2&lt;BR /&gt;&lt;BR /&gt;Of course you could do a directory diff if both directories are available on the same machine.</description>
    <pubDate>Sun, 01 Mar 2009 21:09:39 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2009-03-01T21:09:39Z</dc:date>
    <item>
      <title>Help in script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-in-script/m-p/5160243#M50447</link>
      <description>&lt;BR /&gt;Hi ,&lt;BR /&gt;&lt;BR /&gt;I need to compare ~ 200 files in 2 diffrent directories using cksum command . and get the diffrence files ....&lt;BR /&gt;&lt;BR /&gt;10x</description>
      <pubDate>Sun, 01 Mar 2009 11:27:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-in-script/m-p/5160243#M50447</guid>
      <dc:creator>Chapaya</dc:creator>
      <dc:date>2009-03-01T11:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help in script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-in-script/m-p/5160244#M50448</link>
      <description>Basic approach:&lt;BR /&gt;&lt;BR /&gt;1.) create names for two temporary files&lt;BR /&gt;&lt;BR /&gt;TMPFILE1=$(mktemp)&lt;BR /&gt;TMPFILE2=$(mktemp)&lt;BR /&gt;&lt;BR /&gt;# make sure they will be auto-removed when the script terminates, even if there is an error&lt;BR /&gt;trap "rm -f $TMPFILE1 $TMPFILE2 2&amp;gt;/dev/null" EXIT&lt;BR /&gt;&lt;BR /&gt;2.) run cksum on the files of the first directory, store the output to the first temporary file&lt;BR /&gt;&lt;BR /&gt;3.) run cksum on the files of the second directory, store the output to the second temporary file&lt;BR /&gt;&lt;BR /&gt;4.) run "diff" on the both temporary files to pick out the differences.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Questions: &lt;BR /&gt;Do you need to compare *all* the files in those directories? Or just a subset of ~200 files while the directories may have more than that? &lt;BR /&gt;&lt;BR /&gt;If the latter, how can you get the list of filenames to compare? (Command line/wildcard expression, environment variable, file containing a list of filenames, something else?)&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Sun, 01 Mar 2009 11:50:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-in-script/m-p/5160244#M50448</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2009-03-01T11:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help in script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-in-script/m-p/5160245#M50449</link>
      <description>&amp;gt;MK: 4) run "diff" on the both temporary files to pick out the differences.&lt;BR /&gt;&lt;BR /&gt;You may want to run comm(1) instead of diff.&lt;BR /&gt;You will have to put the names before the checksums:&lt;BR /&gt;cksum * | awk '{print $3, $1, $2}' &amp;gt; $TMPFILE1&lt;BR /&gt;&lt;BR /&gt;Then: comm -3 $TMPFILE1 $TMPFILE2&lt;BR /&gt;&lt;BR /&gt;Of course you could do a directory diff if both directories are available on the same machine.</description>
      <pubDate>Sun, 01 Mar 2009 21:09:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-in-script/m-p/5160245#M50449</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-03-01T21:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help in script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-in-script/m-p/5160246#M50450</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] using cksum command [...]&lt;BR /&gt;&lt;BR /&gt;Why?  Have you considered "diff -q"?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] and get the diffrence files ....&lt;BR /&gt;&lt;BR /&gt;Do you mean a list of the names of the files&lt;BR /&gt;which differ, or a list of the differences?&lt;BR /&gt;&lt;BR /&gt;What, exactly, would you like to see?</description>
      <pubDate>Sun, 01 Mar 2009 22:43:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-in-script/m-p/5160246#M50450</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-03-01T22:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help in script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-in-script/m-p/5160247#M50451</link>
      <description>thanks all.</description>
      <pubDate>Mon, 02 Mar 2009 08:10:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-in-script/m-p/5160247#M50451</guid>
      <dc:creator>Chapaya</dc:creator>
      <dc:date>2009-03-02T08:10:32Z</dc:date>
    </item>
  </channel>
</rss>

