Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- %count = ();
- @files = `ls /tmp/itunes/backup/ipad/*mdinfo`;
- foreach $file (@files)
- {
- $content = `strings $file`;
- if ($content =~ m/(AppDomain-)([\.\w]+)/)
- {
- $count{$2}++;
- }
- elsif ($content =~ /(HomeDomain|MediaDomain|LibraryDomain|KeychainDomain)/)
- {
- $count{"$1"}++;
- }
- else
- {
- $count{'Unknown'}++;
- }
- }
- # Reverse sort
- foreach $key (sort {$count {$b} <=> $count {$a}} keys %count )
- {
- print "$key => $count{$key}\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement