From f23133427797713e723a359daae58b8636c57cde Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 16 May 2021 19:24:23 +0200 Subject: runjobsparallel.in: style: more quotes --- runjobsparallel.in | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'runjobsparallel.in') 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} -- cgit v1.2.3-70-g09d2