SHARE
TWEET

Untitled

a guest Nov 23rd, 2010 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl
  2.  
  3. %count = ();
  4. @files = `ls /tmp/itunes/backup/ipad/*mdinfo`;
  5. foreach $file (@files)
  6. {
  7.         $content = `strings $file`;
  8.         if ($content =~ m/(AppDomain-)([\.\w]+)/)
  9.         {
  10.                 $count{$2}++;
  11.         }
  12.         elsif ($content =~ /(HomeDomain|MediaDomain|LibraryDomain|KeychainDomain)/)
  13.         {
  14.                 $count{"$1"}++;
  15.         }
  16.         else
  17.         {
  18.                 $count{'Unknown'}++;
  19.         }
  20. }
  21.  
  22. # Reverse sort
  23. foreach $key (sort {$count {$b} <=> $count {$a}} keys %count )
  24. {
  25.         print "$key => $count{$key}\n";
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top