Skip to content

Commit

Permalink
xargs -l -P 1
Browse files Browse the repository at this point in the history
  • Loading branch information
zajakin committed Aug 29, 2024
1 parent f685139 commit 2843184
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Docker-BioInf-per-student.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ echo $start | sudo tee start > /dev/null
echo $email | sudo tee email > /dev/null
echo $command | sudo tee command > /dev/null
chmod 555 ./command
chown -R $nuser /home/$nuser/setup docker.txt mail.txt
[ -d "/home/$nuser/setup" ] && chown -R $nuser /home/$nuser/setup
[ -e "docker.txt" ] && chown $nuser docker.txt
[ -e "mail.txt" ] && chown $nuser mail.txt

sudo rm -f /home/$nuser/setup/setup.done
[ -e "/home/$nuser/setup/setup.done" ] && sudo rm -f /home/$nuser/setup/setup.done
sudo su $nuser
admin=`cat admin`
smtp_url=`cat smtp_url`
Expand Down
4 changes: 2 additions & 2 deletions Docker-BioInf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ fi
# if [ `grep -c "^$i$" usedports` -ne 0 ]; then continue; fi
# if [ -e "users.tsv" ] && [ `grep -c -P "\-o\t$i\t" users.tsv` != 0 ]; then continue; fi
cat users.tsv
cat users.tsv | uniq | tr '\t' ' ' | sudo xargs -l -P 10 ./Docker-BioInf-per-student.sh
cat users.tsv | uniq | tr '\t' ' ' | sudo xargs -l -P 1 ./Docker-BioInf-per-student.sh
# staff.tsv contains permament users. User can be temporary excluded by symbol "#" in the beginning of row
cat staff.tsv
grep -h -v "^#" staff.tsv | uniq | tr '\t' ' ' | sudo xargs -l -P 10 ./Docker-BioInf-per-student.sh
grep -h -v "^#" staff.tsv | uniq | tr '\t' ' ' | sudo xargs -l -P 1 ./Docker-BioInf-per-student.sh
cat ../user*/docker.txt > docker.txt

exit # Not start later code automatically
Expand Down

0 comments on commit 2843184

Please sign in to comment.