begin reservations removal

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
Nico Schottelius 2010-03-10 18:48:11 +01:00
parent 000812cd6e
commit c065f8ee82

17
eth/reservation_remove.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
site='https://wiki.systems.ethz.ch/systems_utilisation?action=raw'
month="$(date +%m)"
# get reservations
# get current date
# do not change reservations that
#
# a) are permanent
# b) are in the future
# c) are empty
#
# for all other reservations: delete
#
curl --netrc ${site} | awk -F'\|\|' '$4 !~ /(permanent|time-frame|^ *$)/ { print $0 }'