Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. program | tee >(wc -l)
  2.  
  3. program | awk '{ print } END { print NR }'
  4.  
  5. program | perl -pe 'END {print "$.n"}'
  6.  
  7. program | sed -n 'p;$='
  8.  
  9. program | tee /dev/stderr | wc -l
  10.  
  11. tail -f /var/log/squid/access.log | ( c=0; pl() { echo $c; c=0; }; trap pl SIGHUP; while read a; do (( c=c+1 )); done ) & ( trap 'kill $! ; exit' SIGINT; trap '' SIGHUP; while true; do kill -HUP $! ; sleep 1; done)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement