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

  • Home
  • SEARCH
  • 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 6612275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:04:42+00:00 2026-05-25T20:04:42+00:00

I get a buffer (and I can make it a string) from child_process.exec() in

  • 0

I get a buffer (and I can make it a string) from child_process.exec() in NodeJS. I need to iterate over the lines of the output string. How would I do this?

  • 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-25T20:04:42+00:00Added an answer on May 25, 2026 at 8:04 pm

    One way to avoid splitting the whole thing in memory is to process it one line at a time

    var i = 0;
    while (i < output.length)
    {
        var j = output.indexOf("\\n", i);
        if (j == -1) j = output.length;
        .... process output.substr(i, j-i) ....
        i = j+1;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I get a tabbed interface in carbon emacs which corresponds to one-tab-per-buffer
How can I seek this sb string variable to get those variables:IMKB's value: 64882,72
Where can I get a decent high-level description of the algorithm used in __merge_without_buffer()
I've set the buffer size to the window size to get rid of the
I am trying to setup my swap chain Buffer but I get the following
I am having a bit of a problem. I get a RAW char* buffer
We get a large amount of data from our clients in pdf files in
How can I write only every third item in a char buffer to file
I have to make a post to a third party https url to get
I'm working on an hibernate Spring Mysql app, sometimes when i make a gethibernateTemplate()get(class,id)

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.