Concurrency in a bash scriptBash
2012-02-10
tolleiv
A small template for a script which enables easy concurrency within a bash script
Copy code
- #!/bin/bash
- function func {
- echo "subtask started"
- echo ". run a task here" &
- wait
- echo "subtask done"
- }
- for i in {1..6} ; do
- func $somevariable &
- done
- wait
BASH WAIT CONCURRENCY
Recent comments: ( 0 )
Please loggin to leave a comment!!