Linux wc clone in Erlang