Tagged Questions
1
vote
4answers
49 views
How can i run a piece of code in background?
Can I run a piece of code in background instead of using another script.
[sesiv@itseelm-lx4151 ~]$ cat ./testback2
#!/bin/bash
start_time=$(date +%s)
for i in {1..5}
do
./testscript &
done
wait
...
7
votes
2answers
1k views
Parallelizing a for loop
I want to parallelize the for loops of the following code. How to do this?
#!/bin/bash
N=$1
n=$2
for (( i=1; i<=$N; i++ )); do
min=100000000000000 //set min to some garbage value
for (( ...
6
votes
4answers
2k views
Parallel execution of a program on multiple files
I have a small script that loops through all files of a folder and executes a (usually long lasting) command. Basically it's
for file in ./folder/*;
do
./bin/myProgram $file > ./done/$file
...
2
votes
4answers
726 views
Parallelizing a for loop with very large number of iterations
I want to parallelize a for loop where the number of iterations in the loop can be very large such as 10^6. So ,it will be better if I can create threads rather than process. How to do it? The code is ...