Shell script for testing

Posted by Helltone on Stack Overflow See other posts from Stack Overflow or by Helltone
Published on 2010-06-02T16:00:57Z Indexed on 2010/06/02 16:04 UTC
Read the original article Hit count: 245

Filed under:
|
|
|

I want a simple testing shell script that launches a program N times in parallel, and saves each different output to a different file. I have made a start that launches the program in parallel and saves the output, but how can I keep only the outputs that are different? Also how can I actually make the echo DONE! indicate the end?

#!/bin/bash

N=10

for((i=1; j<=$N; ++i)); do
    ./test > output-$N &
done
echo DONE!

© Stack Overflow or respective owner

Related posts about bash

Related posts about testing