linux - Parallel Processing in While Loop -
i have .sh reading in lines .txt used parameters shell script.every 2 lines process in parallel. currently: current code read in lines in file (2 @ time) first .sh call, lines second .sh call, last .sh call problem: need first 2 lines in first .sh, second .sh, last .sh..then loop , process next 2 lines hheeelllppp!!! :) now: cat xxxxx.txt | while read line; export step=${line//\"/} export step=executemodel_${step//,/_} export pov=$line $dir"/hpm_ws_client.sh" processcalcscriptoptions "$appname" "$pov" "$layers" "$stages" "" "$stages" "$stages" false > "$dir""/"$step"_processid.log" $dir_shell_model"/check_process_status.sh" "$dir" "$step" > "$dir""/""$step""_monitor.log" & $dir"/hpm_ws_client.sh" processcalcscriptoptions "$appname" "$pov" "$laye