# fetch specific lines from file

**URL:** <https://forum.ansible.com/t/fetch-specific-lines-from-file/36382>\
**Category:** Ansible Project\
**Created:** [March 1, 2022, 7:08am UTC](https://forum.ansible.com/t/fetch-specific-lines-from-file/36382 "2022-03-01T07:08:25Z")\
**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:** [March 1, 2022, 7:08am UTC](https://forum.ansible.com/t/fetch-specific-lines-from-file/36382/1 "2022-03-01T07:08:25Z")

</div>

Hi Guys,  
I want to fetch only few lines from “show version” output . I have attached image of required output can someone please help how to fetch these line because line no. is not fix. Thank you in advance. ![Capture11.PNG](https://us1.discourse-cdn.com/ansible/original/2X/f/f037712bde603ae56f1e379a2b6ce77d02ee065a.png)

---

<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:** [March 1, 2022, 7:26am UTC](https://forum.ansible.com/t/fetch-specific-lines-from-file/36382/2 "2022-03-01T07:26:19Z")

</div>

What is your goal?  
What do you want to do with those lines?

> **(attachments)**
>
> ![Capture11.PNG](https://us1.discourse-cdn.com/ansible/original/2X/f/f037712bde603ae56f1e379a2b6ce77d02ee065a.png)
