# To Display line{5-10} from file

**URL:** <https://forum.ansible.com/t/to-display-line-5-10-from-file/36336>\
**Category:** Ansible Project\
**Created:** [February 16, 2022, 8:06am UTC](https://forum.ansible.com/t/to-display-line-5-10-from-file/36336 "2022-02-16T08:06:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akshay\_Jadhav](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@Akshay\_Jadhav](https://forum.ansible.com/u/Akshay_Jadhav)\
**Post date:** [February 16, 2022, 8:06am UTC](https://forum.ansible.com/t/to-display-line-5-10-from-file/36336/1 "2022-02-16T08:06:19Z")

</div>

Hi Guys,  
can someone please tell how to display line 5 to line 10 from the registered file.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [February 16, 2022, 8:36am UTC](https://forum.ansible.com/t/to-display-line-5-10-from-file/36336/2 "2022-02-16T08:36:04Z")

</div>

debug: var=results.stdout\_lines[5:10]
