finish wc(1) using stdin