Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tqdm: add examples #15751

Merged
merged 10 commits into from
Apr 6, 2025
Merged
12 changes: 10 additions & 2 deletions pages/common/tqdm.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# tqdm

> Create a progress bar.
> Show progress over time of a command.
> More information: <https://tqdm.github.io/>.

- Show iterations per second and use stdout afterwards:

`{{seq 10000000}} | tqdm | {{command}}`

- Create a progress bar:

`seq 10000000 | tqdm --total 10000000 --null`
`{{seq 10000000}} | tqdm --total 10000000 | {{command}}`

- Specify unit and total:

`tar -zcf - {{docs/}} | tqdm --bytes --total $(du -sb {{docs/}} | cut -f1) > {{backup.tgz}}`