bash conditions3

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
WAITF=${1:-50};
LINE="";
# Populate line by '#' symbol
for i in $(seq 1 1 $WAITF);
do
LINE="$LINE#";
done
# Show progressbar
for i in $(seq 1 1 $WAITF);
do
echo -en "${LINE}${SPACES}\r";
LINE="${LINE%?}";
SPACES="$SPACES ";
sleep 0.1s;
done
echo -e "\rBang!!!";
exit 0;