Created
April 23, 2021 10:31
-
-
Save jelmervdl/9e0850f5eed849ff7d2437af5799dd9a to your computer and use it in GitHub Desktop.
Interactive line counter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
N=0 | |
echo $N | |
tail -qfn+0 $@ | while read line; do | |
N=$((N+1)) | |
echo -e "\e[1A\e[K${N}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment