From 8e6221db8bf74c533d0d7ef61828400de740c703 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 17 Dec 2013 02:03:10 +0100 Subject: [PATCH] [bde] Shortcut pour afficher les activites. --- bde/activites.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 bde/activites.sh 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;" -- 2.39.2