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
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).
You can also have it pipe stdout and/or stderr if you want.