|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
你通过从书的数量和开发周期及运行速度来证明:net和ruby要比java简单。
日记- #!/bin/perl
- useEncode;
- open(NOTESFILES,$ARGV[0]);
- my%errorMeganotes;
- print
- ">>>>>>>>>>>>>>",$
- ARGV[0],"<<<<<<<<<<
- ";
- while(<NOTESFILES>){
- if($_=~/^(d{4}-d{2}-d{2}sd{2}:d{2}:d{2})s+ERRORs+(.*)s/g
- ){
- if($errorMeganotes{$2}){
- push@{$errorMeganotes{$2}},$1;
- }else{
- $errorMeganotes{$2}=[$1];
- }
- }
- }
- for(keys%errorMeganotes){
- my$tmp_keys=$_;
- my@tmp_array=@{$errorMeganotes{$tmp_keys}};
- print"errornumber:>>",scalar
- (@tmp_array),"<<
- ",encode("GBK",decode
- ("UTF-8",$tmp_keys)),"
- ",join
- (", ",@tmp_array),"
- ";
- }
复制代码 sh
#!/bin/sh
nowDate=$(date-d-1day+%Y-%m-%d);
echo$nowDate
perl/data/apps/shell/meganotesErrorLog.pl/data/apps/meganotes/tomcat/logs/app/app.log.$nowDate> _tmp_$nowDate;
perl/data/apps/shell/meganotesErrorLog.pl/data/apps/schedule/tomcat/logs/app/app.log.$nowDate >>_tmp_$nowDate;
mail-s$nowDate-ERROR-log my@mail.com < _tmp_$nowDate;
rm_tmp_$nowDate;
了局:
>>>>>>>/data/apps/meganotes/tomcat/logs/app/app.log.2009-02-18<<<<<<<<<
errornumber:>>2<<
MusicActionOpLogProxy:142-music.popularTime=[Invalidfieldvalueforfield"music.popularTime".]
2009-02-1815:53:54, 2009-02-1816:00:12
。。。。。。
因为能用到多少功能就用多少,不能用就不用!总的来说:要简单要性能好,可以不用框架。你说java复杂,就是因为你把java(j2ee)与这些框架混在了一起。 |
|