summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-05-16 19:24:23 +0200
committerErich Eckner <git@eckner.net>2021-05-16 19:24:23 +0200
commitf23133427797713e723a359daae58b8636c57cde (patch)
tree1194659e44e4e24bf1e373474a56efb712a18631
parentdf6a00216b72341796df57fb1267859b7af1e977 (diff)
downloadrunjobsparallel-f23133427797713e723a359daae58b8636c57cde.tar.xz
runjobsparallel.in: style: more quotes
-rwxr-xr-xrunjobsparallel.in11
1 files changed, 5 insertions, 6 deletions
diff --git a/runjobsparallel.in b/runjobsparallel.in
index 2a7f62a..1e5648c 100755
--- a/runjobsparallel.in
+++ b/runjobsparallel.in
@@ -20,7 +20,7 @@ for file in ./*; do
if [ -f $file ] && [ -x $file ]; then
i=${#errFiles[@]}
errFiles[${i}]="${tmpDir}/err.${i}"
- (nice -n 19 $file; echo $? > ${errFiles[${i}]})&
+ (nice -n 19 $file; echo $? > "${errFiles[${i}]}")&
pids[${i}]=$!
fi
done
@@ -34,15 +34,14 @@ do
for ((i=0; i<${#errFiles[@]}; i++))
do
pkill -0 "${pids[${i}]}" \
+ && [ ! -r "${errFiles[${i}]}" ] \
&& laeuftNoch=true \
|| laeuftNoch=false
- if [ -r ${errFiles[${i}]} ]
- then
+ if [ -r "${errFiles[${i}]}" ]; then
curErr=$(cat "${errFiles[${i}]}")
[ ${curErr} -gt ${maxErr} ] && maxErr=${curErr}
- elif ${laeuftNoch}
- then
+ elif ${laeuftNoch}; then
allesDa=false
else
echo 255 > "${errFiles[${i}]}"
@@ -51,7 +50,7 @@ do
done
done
-rm -rf ${tmpDir}
+rm -rf "${tmpDir}"
exit ${maxErr}