The following markup can be used to show a loading bar for 20 seconds in a bash shell script.
#!/bin/bash i=1 while [ $i -le 20 ] do echo -n "." i=$(expr $i + 1) sleep 1 done