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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:33:56+00:00 2026-05-26T05:33:56+00:00

I have an extremely long and complicated shell pipeline set up to grab 2.2Gb

  • 0

I have an extremely long and complicated shell pipeline set up to grab 2.2Gb of data and process it. It currently takes 45 minutes to process. The pipeline is a number of cut, grep, sort, uniq, grep and awk commands tied together. I have my suspicion that it’s the grep portion that is causing it to take so much time but I have no way of confirming it.

Is there anyway to “profile” the entire pipeline from end to end to determine which component is the slowest and if it is CPU or IO bound so it can be optimised?

I cannot post the entire command here unfortunately as it would require posting proprietary information but I suspect it is the following bit checking it out with htop:

grep -v ^[0-9]
  • 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-05-26T05:33:56+00:00Added an answer on May 26, 2026 at 5:33 am

    I found the problem myself after some further experimentation. It appears to be due to the encoding support in grep. Using the following hung the pipeline:

    grep -v ^[0-9]
    

    I replaced it with sed as follows and it finished in under 45 seconds!

    sed '/^[0-9]/d'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have an extremely long floating point number in Ruby such as: x
I have the following method that takes an extremely long time to run and
We have a client who desires some extremely long pages. Say 4000px plus. They
I have a using statement defined like this in codebehind: using Name = Extremely.Long.And.Unwieldy.Namespace
I am currently learning F# and have tried (an extremely) simple example of FizzBuzz.
I'm working on a small academic research about extremely long and complicated functions in
I have problem with extremely long compiling time on my C++ code where I
I have an extremely long command line given to ar (android ar exactly) by
I have an extremely long string that I want to parse for a numeric
I'm trying to simplify some code where I have an extremely long switch statement

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.