Loading Bar For Bash In Linux
Page 1 of 1
Loading Bar For Bash In Linux
Loading Bar For Bash In Linux
- Code:
#/bin/bash
# Usage: ./test.sh
echo -en "\e[92mPlease Wait \c"
netstat > out.txt
count=0
total=34
pstr="[=======================================================================]"
while [ $count -lt $total ]; do
sleep 0.1 # change speed here for faster speed use line below!
# sleep 0.06
count=$(( $count + 1 ))
pd=$(( $count * 73 / $total ))
printf "\r%3d.%1d%% %.${pd}s" $(( $count * 100 / $total )) $(( ($count * 1000 / $total) % 10 )) $pstr
done
cat out.txt
Similar topics
» Bash Psychic Game For Linux Bash
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
» Calculating Pi With Bash On Linux
» Linux Bash Who Am I Game Example
» Linux Bash Asci Art
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
» Calculating Pi With Bash On Linux
» Linux Bash Who Am I Game Example
» Linux Bash Asci Art
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|