This is an sample code for a progress bar under Linux.
and refering below link: 良许Linux
You can learn
- to edit Makefile
- to delay in Linux: sleep(), usleep()
- to grasp "\r" and "\n"
- to flush temp buffer: fflush(stdout)
- to design rotation with "|/-\"
- to design a progress bar in linux
The run result is as below:
[=====> ][15%][/]