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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:02:39+00:00 2026-05-20T11:02:39+00:00

I have a program i wrote in c++ and shared the executable with a

  • 0

I have a program i wrote in c++ and shared the executable with a client. The program basically uses some third party security libraries to generate a code give an input value.

as a test we provided them a list of 2million inputs. they are writing a script in unix that is opening the file reading the inputs and loading the executable each time with the input parameter.

This is a one time thing, however they are asking if there is any other efficient way of doing this via scripting. Just curious if there was a way in unix to speed up this process.

Here is the following unix script they are using….
anything here that is inefficient that they can use which will make it faster?

#!/usr/bin/ksh 
for input in `cat test_input.txt` 
do 
echo ${input} `my_script${input}` 
done 
# The End 
  • 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-20T11:02:40+00:00Added an answer on May 20, 2026 at 11:02 am

    This isn’t a unix shell script, but a scripting language like python also works for this type of thing (and it’s on most unix based computers by default).

    #!/usr/bin/python
    import subprocess
    
    with open('inputfile.txt', 'r') as f:
        for line in f.readlines():
            retcode = subprocess.call(['execname', line])
            print retcode
    

    You can also have it pipe stdout and/or stderr if you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program written in Ruby and C. The C portion is a
In a program I wrote, 20% of the time is being spent on finding
I have a program using OpenMP to parallelize a for-loop. Inside the loop, the
I'm trying to compile the following simple DL library example code from Program-Library-HOWTO with
Solution (kinda): Turns out this impersonation with .NET's security only allows application-level access. Since
This question is about the same program I previously asked about . To recap,
I have a fairly specific question about concurrent programming in C. I have done
I am new to linux, while compiling with dynamic library I am getting the
I guess I don't fully understand how destructors work in C++. Here is the
Is it possible to open a file in .NET with non exclusive write access?

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.