# Easy way to update text in terminal (instead of printing more text)?

**URL:** <https://discourse.julialang.org/t/easy-way-to-update-text-in-terminal-instead-of-printing-more-text/81818>\
**Category:** General Usage\
**Tags:** cli\
**Created:** [May 27, 2022, 10:04pm UTC](https://discourse.julialang.org/t/easy-way-to-update-text-in-terminal-instead-of-printing-more-text/81818 "2022-05-27T22:04:21Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [May 27, 2022, 11:06pm UTC](https://discourse.julialang.org/t/easy-way-to-update-text-in-terminal-instead-of-printing-more-text/81818/4 "2022-05-27T23:06:14Z")

</div>

[Linking here](https://discourse.julialang.org/t/update-variable-in-logged-message-without-printing-a-new-line/32755/3) one example of ANSI escape sequence suggested by Steve.

And sample code here below for easier reference:

```julia
for n in 1:100
    print("Iteration number $n/100\u001b[1000D")
    sleep(0.002) # to simulate code waiting time
end

```

---

_[View the full topic](https://discourse.julialang.org/t/easy-way-to-update-text-in-terminal-instead-of-printing-more-text/81818)._
