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 8713483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:21:13+00:00 2026-06-13T05:21:13+00:00

I have some analysis code on a computing cluster. The output of the code

  • 0

I have some analysis code on a computing cluster. The output of the code is a table of floating point numbers. The final output is printed to standard out, with a bunch of other messages preceding it and following it. It looks something like this:

Welcome to Computer X
Setting up parallel environment...
Setup complete.  Running tasks....
0.059 9.342114 10.324921 0.3 0
0.123 123.4231102 231.49 45.7 84
Job completed on July 4, 1776
Thank you and have a nice day

I need to extract the numbers only. Unfortunately, I don’t know a priori how many digits will comprise each number (is it going to be 0.342123 or 1 or 1.05), and how many of the text lines will precede or follow the number.

I have used grep before, but I don’t know much of anything about regular expressions. I looked up examples for, say, how to match phone numbers (###-###-####) etc., but I couldn’t think of anything where you don’t know how many digits to skip. The only thing I do know is that there will be, say, 5 columns of data to extract.

  • 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-13T05:21:14+00:00Added an answer on June 13, 2026 at 5:21 am

    Use grep -ho with regex pattern

    ^(\d+(\.\d+)?(\s+|$))+$
    

    or if you sure 5 numbers are always in row, then

    ^(\d+(\.\d+)?(\s+|$)){5}$
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an idea for a hobby project which performs some code analysis and
I am doing an analysis of Credit Union social activity. I have some code
I have some data analysis code that processes an input file and outputs HTML
I have some code that will trigger Code Analysis warning CA1063: CA1063 : Microsoft.Design
I have some Perl code (for performance analysis) first developed under Linux which now
So I have some code that can read the methods out of a .coverage
I have some data analysis that needs to perform. On average, it would involve
I have a long-ish script to do some data analysis, and it has to
I have a video in one tab and some data analysis based on the
I'm doing some personal research into text analysis, and have come up with close

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.