Skip to content

Instantly share code, notes, and snippets.

@devdrops
Created May 24, 2016 17:45
Show Gist options
  • Select an option

  • Save devdrops/84ee8f0ecc257805fc80b7817cdf281c to your computer and use it in GitHub Desktop.

Select an option

Save devdrops/84ee8f0ecc257805fc80b7817cdf281c to your computer and use it in GitHub Desktop.
Progress bar in bash: examples

Progress bar in bash: examples

#!/bin/bash

i=0
while ((i < 101)); do
  printf "\r%3d%% loaded..." $i
  ((i += 1))
  # Of course, in real life, we'd be getting i from somewhere meaningful.
  sleep 0.01
done
echo ' Done!'
@devdrops
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment