From 24e26c2b661c603c07e50bb1160ce0e0519e41c3 Mon Sep 17 00:00:00 2001 From: julien Date: Tue, 7 Jul 2009 16:38:54 +0200 Subject: Fixed the trains script to handle canceled trains and wrote the help command. --- shtrains.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shtrains.sh') diff --git a/shtrains.sh b/shtrains.sh index 0d9739a..2f1936f 100755 --- a/shtrains.sh +++ b/shtrains.sh @@ -9,6 +9,10 @@ do read STATION || break read UGUU || break [[ $PATTERN =~ \ *[A-Z]{4}\ *(.*) ]] && PATTERN=${BASH_REMATCH[1]} + if [[ $UGUU =~ Supprime ]]; then + read UGUU || break + continue + fi if [ -n "$*" ]; then [[ $STATION =~ $@ ]] && echo "$PATTERN $STATION" else -- cgit v1.2.3