#!/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!'
Created
May 24, 2016 17:45
-
-
Save devdrops/84ee8f0ecc257805fc80b7817cdf281c to your computer and use it in GitHub Desktop.
Progress bar in bash: examples
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check http://mywiki.wooledge.org/BashFAQ/044 for more 😉