Skip to content

Instantly share code, notes, and snippets.

@yurrriq
Last active August 29, 2015 14:02
Show Gist options
  • Save yurrriq/f1f6498dd7d3702dfb00 to your computer and use it in GitHub Desktop.
Save yurrriq/f1f6498dd7d3702dfb00 to your computer and use it in GitHub Desktop.
Bash progress indication using tput
#!/bin/bash
echo -n "Progress: "
for x in $(seq -f "%g" 0 99); do
sleep .05
tput cub $((${#x}+1)); echo -n "$((x+1))%"
done
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment