Sign in

Echo / T3212_B2B_723 · Files

GitLab

  • Go to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • Forks
  • Network
  • T3212_B2B_723
  • tools
  • check_repeated.pl
  • 从SVN移版本:T3212_61D_MBR_V1.8_2015.07.23(B32B)的代码
    c17ddead
    Echo authored
    2017-09-04 11:43:42 +0800  
    Browse Files »
check_repeated.pl 421 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
#!/usr/local/bin/perl


my $count;
my $repeated=0;


my @in_var = @ARGV;

my @new_var;

	foreach $a  (@in_var)
	{
		 $count =0;
		 #print "var_a=$a \n";
		 		 
		 foreach $b  (@in_var)
		 {
		 	 if ( "$a" eq "$b" )
		 	 {
		 	   $count++;	
		 	   
		   }
		 }	
		 
	 	 if ($count==0)
	 	 {

 	 	 } elsif ( $count > 1)
		 {
		 	 print "$a repeated $count times ! \n";

		 	 $repeated++;
		 } 
		 
	}	

exit $repeated;