FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
utils/batch.SMP.processing.with.bash at master · tstackhouse/utils · GitHub
tstackhouse
utils
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
utils
/
batch.SMP.processing.with.bash
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
20 lines (16 loc) · 350 Bytes
Breadcrumbs
utils
/
batch.SMP.processing.with.bash
Copy path
File metadata and controls
executable file
·
20 lines (16 loc) · 350 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!
/bin/bash
CPUS=
$(
grep -c proc /proc/cpuinfo
)
function
pwait()
{
while
[
$(
jobs -p
|
wc -l
)
-ge
$1
]
;
do
echo
Maximum CPUs reached... waiting...
sleep 1
done
}
for
whatever
in
{1..10}
;
do
echo
Spawning another 5 second wait...
sleep 5
&
pwait
$CPUS
done
echo
Waiting
for
all to finish...
wait
echo
All done.
Back
|
FazBrowse Home
|
New Git URL