Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8562093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:39:17+00:00 2026-06-11T16:39:17+00:00

I have a output in a file and i want to parse the file

  • 0

I have a output in a file and i want to parse the file line by line to just get the line with the “ip address(10.113.193.70)” and the “Version: 47.80.99.08” to the standard output. What would be the best way to parse using grep/awk or bash?

10.113.193.70

Executing (0,0,0,0,0,0,0,0,0,0):
==== product information ====
Product: e10
Package: default
Version: 47.80.99.08
Type:    customer
Builder: symsm
Project: RAID
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:39:18+00:00Added an answer on June 11, 2026 at 4:39 pm

    all of awk sed grep bash will work

    this is assuming that the line with the IP is on the start of the line,
    and no other line starts with a digit.
    Otherwise you can refine the IP pattern.

    bash:

    #!/usr/bin/env bash
    while read -r
    do [[ $REPLY =~ ^(Version|[[:digit:]]) ]] && echo "$REPLY"
    done < file
    

    grep:

    $ grep "^\(Version\|[[:digit:]]\)" file
    10.113.193.70
    Version: 47.80.99.08
    

    awk:

    $ awk '$1 ~ /^(Version|[0-9])/ { print }' file
    10.113.193.70
    Version: 47.80.99.08
    

    sed:

    $ sed -n '/^\(Version\|[[:digit:]]\)/p' file
    10.113.193.70
    Version: 47.80.99.08
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an mp3 file in my site. I want to output it as
i have a xml and a xsl file. i want output of xsl in
I have the following question. How can I print an output file line by
I have a C# application that receives an html file. I want to parse
I have a file with a list of records which I parse one line
File I want to parse: input Pattern; input SDF; input ABC input Pattern; output
I have an SQL file which I want to parse and execute in oracle
I have the following very simple XML file and I want to quickly parse
I have: $page_file_temp = $_SERVER[PHP_SELF]; which will output: /templates/somename/index.php I want to extract from
I have a perl program that takes input and output file arguments, and I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.