# Printing output on screen

**URL:** https://discourse.julialang.org/t/printing-output-on-screen/71656
**Category:** General Usage
**Created:** [November 17, 2021, 12:49pm UTC](https://discourse.julialang.org/t/printing-output-on-screen/71656 "2021-11-17T12:49:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Dan.phi](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@Dan.phi](https://discourse.julialang.org/u/Dan.phi)
#### Post date: [November 17, 2021, 12:49pm UTC](https://discourse.julialang.org/t/printing-output-on-screen/71656/1 "2021-11-17T12:49:26Z")

</div>

Consider the following small example:

```julia
for i in 1:10
    println("Iteration: $(i)/10")
end

```

This shows up on the screen as follows:  
 ![example](https://global.discourse-cdn.com/julialang/original/3X/9/0/90c22ba7cc25d70b86c067f2efe7b9122fae303c.png)

In each iteration, a new line is added. Is there any way that would ensure that visually it looks like the output is printed on the same line, exactly over the previous call, but still updating? One would only see one line with `Iteration: x/10`, and `x` would keep updating.

---

<div class="post-metadata">

### Author: ![MarcMush](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marcmush/32/18006_2.png) [@MarcMush](https://discourse.julialang.org/u/MarcMush)
#### Post date: [November 17, 2021, 12:53pm UTC](https://discourse.julialang.org/t/printing-output-on-screen/71656/2 "2021-11-17T12:53:31Z")

</div>

`\r` moves the cursor at the beginning of the line:

```julia
for i in 1:10
    sleep(0.1)
    print("\rIteration: $(i)/10")
end

```

If you want nice progressbars, you can look at [GitHub - timholy/ProgressMeter.jl: Progress meter for long-running computations](https://github.com/timholy/ProgressMeter.jl)
