use hash to find dup
来源:互联网 发布:淘宝退货地址哪里设置 编辑:程序博客网 时间:2024/05/16 07:29
#!/usr/bin/perl -w$direct=$ARGV[0];system ("sh /home/fzhao/txt/1.sh $direct");$count=0;$dup=0;$all=0;$len=0;@b=();%hash;open my $fh , '<' ,'1';open my $fh2 , '>>' ,'11';while (my $line=<$fh>) { @array =split (/\s+/,$line); if ( $direct==0 ) { $hsRas=$array[14]; } else { $hsRas=$array[15]; } $all++; $flag=0; $key=0; for $key (keys %hash) { if ( $key eq $hsRas ) { $dup++; $flag=1; last; } } $hash{$key} =1; if ( $flag == 0) { print $fh2 "$hsRas\n"; $count++; }}close ($fh);close ($fh2);print "all=$all;dup=$dup;count=$count \n";
阅读全文
0 0
- use hash to find dup
- Dalvik VM Hash - how to use
- Use regular expression to find something
- Use selector-syntax to find elements
- Use the Shapes window to organize and find shapes
- How do I find which phpize to use?
- AC dream 1730 Use Machine Learning to Find GF
- failed to find target with hash string 'android-23'
- Android failed to find target with hash string 'android-23'
- failed to find target with hash string 'android-XX'
- failed to find target with hash string android
- ruby on rails 使用text存储hash类型的数据 Use text filed to store the hash map
- Umdhtools.exe: How to Use Umdh.exe to Find Memory Leaks
- spring boot Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @Spr
- Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(
- spring boot Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @Spr
- spring boot Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration
- dup() ---- Linux function dup() to save debug log.
- RabbitMQ Network Partitions 服务日志对比
- DZNEmptyDataSet空白数据集显示框架简单使用
- Springmvc第一讲学习笔记,数据接收与乱码解决
- css3@media规则
- LeetCode算法题目:Course Schedule
- use hash to find dup
- AFNetworking 文件断点下载详细解读
- 40. OP-TEE中secure stroage------读写安全文件数据(read and write)
- OC基础-类对象在内存中的存储方式13
- mysql数据库面试总结
- 玩了下STM8单片机
- Python 第5章 条件和递归
- from flask import Flask 显示 "ImportError: cannot import name 'Flask'"
- p48_合并两个已排序数组