Skip to content

Instantly share code, notes, and snippets.

@jelmervdl
Created April 23, 2021 10:31
Show Gist options
  • Save jelmervdl/9e0850f5eed849ff7d2437af5799dd9a to your computer and use it in GitHub Desktop.
Save jelmervdl/9e0850f5eed849ff7d2437af5799dd9a to your computer and use it in GitHub Desktop.
Interactive line counter
#!/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