From c065f8ee82ff4e0830daae6ee22e1f03ce505b44 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 10 Mar 2010 18:48:11 +0100 Subject: [PATCH] begin reservations removal Signed-off-by: Nico Schottelius --- eth/reservation_remove.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 eth/reservation_remove.sh diff --git a/eth/reservation_remove.sh b/eth/reservation_remove.sh new file mode 100755 index 0000000..9bf79c0 --- /dev/null +++ b/eth/reservation_remove.sh @@ -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 }'