?? grep.pl
字號:
#!/usr/bin/perl system "rm -r result_file";open(filename,"@ARGV[0]") || die "can't open the file";system "mkdir result_file"; open(file3,">>./result_file/final_result") || die " the file is missing ";while($name=<filename>) { open(file1,"./chip_top_cts_05_23/$name"); open(file2,">>./result_file/$name")|| die "can't open the file"; while (<file1>) { if (!/^</) { @temp=split(" ",$_);# push(@$name_array,"$temp[0]");# print file2 "$temp[0]\n";# @tmep1=split('\/',$temp[0]);# print " $temp[0]\n"; if ( $temp[0]=~/[CK]$/ ) { chop($temp[0]); chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[RN]$/ ) { chop($temp[0]); chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[A]$/ ) { chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[Y]$/ ) { chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[SE]$/ ) { chop($temp[0]); chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[B]$/ ) { chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[D]$/ ) { chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[S0]$/ ) { chop($temp[0]); chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[SI]$/ ) { chop($temp[0]); chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[Q]$/ ) { chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[A1]$/ ) { chop($temp[0]); chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[A2]$/ ) { chop($temp[0]); chop($temp[0]); chop($temp[0]); } elsif ($temp[0]=~/[G]$/ ) { chop($temp[0]); chop($temp[0]); } else {# print " please check the $temp[0]\n"; }# if ($temp[0] = ~/cell/) {# print " the cell error is in $name ";# }# if ($temp[0] = ~/max/ ) {# print " the max error is in $name";# }# print "$temp[0]\n"; if (($temp[0] !~/cell/) && ($temp[0] !~/max/)) {# print "good\n";# print "$temp[0]\n"; $cell_name_1 = $temp[0]; if ($cell_name_1 ne $cell_name_2 ) { print file2 "$temp[0]\n"; print file3 "$temp[0]\n"; $cell_name_2 = $temp[0]; } } } }# $max = $$name_array[0];# $min = $$name_array[0];# for($i=0;i<=$#$name_array-1;$i++) {# if(($name_array[$i] <= $max) && ($name_array[$i] => $min)) {# }# elsif ($name_array[$i] > $max) {# $max = $name_array[$i];# }# elsif ($name_array[$i] < $min) {# $min = $name_array[$i];# }# }# $result=$max-$min;# print file2 " ==========================";# print file2 " The max skew is $result ";# print file2 " =========================="; close(file2); close(file1); } close(filename); close(file3);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -