<?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: Change diff-Algorithmus in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713841#M103635</link>
    <description>No :(</description>
    <pubDate>Fri, 20 Jan 2006 05:39:29 GMT</pubDate>
    <dc:creator>Kalin Evtimov</dc:creator>
    <dc:date>2006-01-20T05:39:29Z</dc:date>
    <item>
      <title>Change diff-Algorithmus</title>
      <link>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713839#M103633</link>
      <description>Hallo!&lt;BR /&gt;I am using this algorithm to compare two files.&lt;BR /&gt;&lt;BR /&gt;Code:&lt;BR /&gt;&lt;BR /&gt;@one = qw(a a a a b c d e f g);&lt;BR /&gt;  @two = qw(b c e h i i i i j);&lt;BR /&gt;  my %tracker = ();&lt;BR /&gt;  $tracker{$_} .= 1 for @one;&lt;BR /&gt;  $tracker{$_} .= 2 for @two;&lt;BR /&gt;  for (sort keys %tracker) {&lt;BR /&gt;    if ($tracker{$_} !~ /1/) {&lt;BR /&gt;      print "$_ has been added\n";&lt;BR /&gt;    } elsif ($tracker{$_} !~ /2/) {&lt;BR /&gt;      print "$_ has been deleted\n";&lt;BR /&gt;    } else {&lt;BR /&gt;      print "$_ is in both old and new\n";&lt;BR /&gt;    }&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It has following output:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;a has been deleted&lt;BR /&gt;b is in both old and new&lt;BR /&gt;c is in both old and new&lt;BR /&gt;d has been deleted&lt;BR /&gt;e is in both old and new&lt;BR /&gt;f has been deleted&lt;BR /&gt;g has been deleted&lt;BR /&gt;h has been added&lt;BR /&gt;i has been added&lt;BR /&gt;j has been added&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;here "a" is mentioned only once, since there are 4 "a"-s in the first array. What can I chnage in order to get them all appearing?&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Fri, 20 Jan 2006 05:05:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713839#M103633</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2006-01-20T05:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Change diff-Algorithmus</title>
      <link>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713840#M103634</link>
      <description>Hi,&lt;BR /&gt;not really a solution, but have you had a look at the "comm" command ?</description>
      <pubDate>Fri, 20 Jan 2006 05:24:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713840#M103634</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-01-20T05:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Change diff-Algorithmus</title>
      <link>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713841#M103635</link>
      <description>No :(</description>
      <pubDate>Fri, 20 Jan 2006 05:39:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713841#M103635</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2006-01-20T05:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Change diff-Algorithmus</title>
      <link>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713842#M103636</link>
      <description>comm will not wirk, because I am comparing log files and if I sort them, I won't be able to extract the last changes that happened.</description>
      <pubDate>Fri, 20 Jan 2006 05:45:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713842#M103636</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2006-01-20T05:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Change diff-Algorithmus</title>
      <link>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713843#M103637</link>
      <description>Ok,&lt;BR /&gt;how about:&lt;BR /&gt;@one = qw(a a a a b c d e f g);&lt;BR /&gt;@two = qw(b c e h i i i i j);&lt;BR /&gt;my %tracker = ();&lt;BR /&gt;$tracker{$_} .= 1 for @one;&lt;BR /&gt;$tracker{$_} .= 2 for @two;&lt;BR /&gt;for (sort keys %tracker) {&lt;BR /&gt;$tester = length($tracker{$_});&lt;BR /&gt;if ($tracker{$_} !~ /1/) {&lt;BR /&gt;print "$_ has been added $tester time(s)\n";&lt;BR /&gt;} elsif ($tracker{$_} !~ /2/) {&lt;BR /&gt;print "$_ has been deleted $tester time(s)\n";&lt;BR /&gt;} else {&lt;BR /&gt;print "$_ is in both old and new\n";&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Jan 2006 06:29:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713843#M103637</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-01-20T06:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Change diff-Algorithmus</title>
      <link>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713844#M103638</link>
      <description>Kalin,&lt;BR /&gt;how are you getting on with this?&lt;BR /&gt;Can you pleas update.</description>
      <pubDate>Mon, 23 Jan 2006 04:20:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713844#M103638</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-01-23T04:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Change diff-Algorithmus</title>
      <link>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713845#M103639</link>
      <description>Yeah, of course. &lt;BR /&gt;I was just playing around with this piece of code. &lt;BR /&gt;You idea worked for me perfectly. I just put the $tester in a for-loop to print $tester-times the element and now I have it. &lt;BR /&gt;&lt;BR /&gt;Thank you for this idea!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Jan 2006 05:33:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/change-diff-algorithmus/m-p/3713845#M103639</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2006-01-23T05:33:21Z</dc:date>
    </item>
  </channel>
</rss>

