From: Vincent Date: Tue, 17 Dec 2013 01:03:10 +0000 (+0100) Subject: [bde] Shortcut pour afficher les activites. X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=8e6221db8bf74c533d0d7ef61828400de740c703;p=scripts-20-100.git [bde] Shortcut pour afficher les activites. --- diff --git a/bde/activites.sh b/bde/activites.sh new file mode 100755 index 0000000..2d3efd0 --- /dev/null +++ b/bde/activites.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Pour avoir rapidement la liste des activités + +export LESS="-S" + +for i in $@ +do + if [ $i = "--pot" ] + then pot=1; + fi; +done + +if [ "${pot}" = "1" ] +then + WHERE="WHERE titre ILIKE '%pot%' " +fi + +psql bde -c "SELECT * FROM activites ${WHERE}ORDER BY debut DESC;"