echo `grep a num2 | tr 'a' ' '` | tr ' ' '+' | bc ;echo `grep b num2 | tr 'a' ' '` | tr ' ' '+' | bc 美しくない...#usptomo
2012-12-08 16:13:44やっぱり汚い回答。expr `cat num2|sed -n 's/a //p'|xargs echo|sed 's/ / + /g'`;expr `cat num2|sed -n 's/b //p'|xargs echo|sed 's/ / + /g'` #usptomo
2012-12-08 16:14:59Perlだと cat num2| pwel -e 'while(<STDIN>){ @a=split/\s/;$k=shift @a;map{$a{$k}+=$_}@a;}for(keys %a){printf"%s=>%d\n", $_, $a{$_}}' #usptomo
2012-12-08 16:15:38[ (っ´∀`)っ@友の会 ~]$ expr $(grep ^a num2|cut -d' ' -f2-|tr '\n' ' '|sed -e "s/\ $//g;s/\ /\ +\ /g") #usptomo
2012-12-08 16:16:01[ (っ´∀`)っ@友の会 ~]$ expr $(grep ^b num2|cut -d' ' -f2-|tr '\n' ' '|sed -e "s/\ $//g;s/\ /\ +\ /g") #usptomo
2012-12-08 16:16:10なるほどbcに食わせれば良いのか。cat num2|sed -n 's/a //p'|xargs echo|sed 's/ /+/g'|bc;cat num2|sed -n 's/b //p'|xargs echo|sed 's/ /+/g'|bc #usptomo
2012-12-08 16:17:59@usptomo できた cat osyoga2|xargs -I% date -d %|awk '{print $4}'|sort|uniq -c #usptomo
2012-12-08 16:28:21[ (っ´∀`)っ@友の会 ~]$ cat osyouga2 | head -n 1 ; cat osyouga2 | tail -n 1 19900101 20120101 #usptomo
2012-12-08 16:28:41[ (っ´∀`)っ@友の会 ~]$ LANG=C date -f osyouga2 | awk '{print $1}' | sort | uniq -c #usptomo
2012-12-08 16:28:54こんなかんじ。$ cat oshoga2|xargs -l1 date '+%A' -d|sort|uniq -c #usptomo
2012-12-08 16:33:58これはアカン cat osyouga2 | ruby -ne 'puts `date -d #{$_}`.split[3]' | sort | uniq -c #usptomo
2012-12-08 16:36:29dateに-fなんてオプションがあったのか。$ date '+%A' -f oshoga2|sort|uniq -c #usptomo
2012-12-08 16:39:04tukubaiをインストールしている場合 [hamada@localhost 20121208]$ cat osyouga2 | yobi -j 1 | awk '{print $NF}' | sort | uniq -c #usptomo
2012-12-08 16:44:38tukubaiをインストールしている場合 [hamada@localhost 20121208]$ cat osyouga2 | yobi -j 1 | self 3 2 | sort | uniq -c #usptomo
2012-12-08 16:45:47IRCのコマンドで ping と pong があった様な気がする #usptomo
2012-12-08 16:55:12「シェル芸人にオレはなる!」みたいなあつまりに Cygwin で参戦してるのだけど、ワンライナーと基本コマンドしかつかえないというしばりに思いのほかくるしめられてる(いまんとこなんとか全問解けてるのが救い…) #usptomo
2012-12-08 16:58:38