awk , perl memo

awk -F'\t' '{ if($14 ~ /jp/ || $15 ~ /jp/ || $16 ~ /jp/){print $10 "\t" $12 "\t" $14 "\t" $15 "\t" $16} }'
awk -F'\t' '{ print $10 "\t" $12 "\t" $14 "\t" $15 "\t" $16 }' test.txt | perl -ne 'BEGIN {%aryData=();$i=0;$all=0;} { if (/(.+)\t([0-9]+)/) { $i++;$all+=$2;$nnum=int(100*$i/44669);$vnum = int(($all/170793)*100);print "$i\t$1\t$2\t$all\t$nnum%\t$vnum%\r\n"; }}'

This entry was posted on 金曜日, 12月 10th, 2010 at 11:09 AM and is filed under blog. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。