Skip to content

Instantly share code, notes, and snippets.

@ali5h
Created August 25, 2017 22:09
Show Gist options
  • Save ali5h/c56c035891b821b3dff24fb78262067c to your computer and use it in GitHub Desktop.
Save ali5h/c56c035891b821b3dff24fb78262067c to your computer and use it in GitHub Desktop.
bash tricks
# counting the lines in pipe
cmd | { I=0; while read; do printf "$((++I))\r"; done; echo ""; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment