我有一个shell脚本
所以伪代码看起来像这样
file1.sh
#!/bin/bash
for i in $(seq 1 1000)
do
Generating random numbers here , sorting and outputting to file$i.txt
done
Run Code Online (Sandbox Code Playgroud)
有没有办法运行这个shell脚本parallel来充分利用多核CPU?
在这一刻, ./file1.sh按顺序执行1到1000次运行并且速度非常慢.
谢谢你的帮助.