NEW: Some new scripts

This commit is contained in:
xpk
2025-10-25 16:52:03 +08:00
parent 52f8735047
commit 4abba069f9
4 changed files with 102 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
function doit() {
echo $1 | ts
sleep 1
}
export -f doit
echo "* Regular loop execution"
for i in $(seq 1 5); do
doit $i
done
echo "* Execution with sem"
for i in $(seq 1 5); do
sem -j4 doit $i
done
sem --wait