diff options
Diffstat (limited to '')
-rwxr-xr-x | inf/26.5.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/inf/26.5.sh b/inf/26.5.sh new file mode 100755 index 0000000..61682d6 --- /dev/null +++ b/inf/26.5.sh @@ -0,0 +1,20 @@ +#!/bin/bash +url=https://ucilnice.gimb.org +id=29761 +t=`mktemp -p/tmp 26.5.XXXXX` +c="--cookie $t --cookie-jar $t -k --location" +co="$c -i" +r=`curl $url/login/index.php $co` +logintoken=`grep logintoken <<<$r | cut -d\" -f6 | cut -d\" -f1` +sesskey=`curl $url/login/index.php $co --data-raw "logintoken=$logintoken&username=$GIMB_U&password=$GIMB_P" | grep sesskey | cut -d\" -f8 | cut -d\" -f1` +seznam=`echo seznam nazadnje posodobljen: $(date) && curl $url/mod/choice/report.php $c --data-raw "id=$id&download=txt&sesskey=$sesskey"` +se=`grep -v Skupina <<<$seznam | grep -v nazadnje` +sez=`cat <<<$se | grep -v "ni odgovora"` +vsi=`grep Dijaki domain_users.grep | grep 2019 | grep -v 2019Q | grep -v test | cut -f3` +razlika=`comm -13 <(cat <<<$sez | cut -f3 | cut -d@ -f1 | sort) <(cat <<<$vsi | sort)` +cat <<<$razlika > neprijavljeni.txt +cat <<<$sez > prijavljeni.txt +cat <<<$se > vpisani.txt +cat <<<$vsi > vsi.txt +echo "zadnja posodobitev: " `date` > stanje.txt +echo`wc -l {{ne,}prijavljeni,vpisani,vsi}.txt` >> stanje.txt |