rm -f node ; mkfifo node cat file | tee >(wc -l > node ) | cat - node