diff options
author | julien | 2009-07-07 16:38:54 +0200 |
---|---|---|
committer | julien | 2009-07-07 16:38:54 +0200 |
commit | 24e26c2b661c603c07e50bb1160ce0e0519e41c3 (patch) | |
tree | 5daa564c3a71c5e09461a1d4dcfa00ce95543ac1 /shtrains.sh | |
parent | Made a working trains script. (diff) | |
download | shbot-24e26c2b661c603c07e50bb1160ce0e0519e41c3.tar.gz shbot-24e26c2b661c603c07e50bb1160ce0e0519e41c3.tar.bz2 shbot-24e26c2b661c603c07e50bb1160ce0e0519e41c3.zip |
Fixed the trains script to handle canceled trains and wrote the help command.
Diffstat (limited to '')
-rwxr-xr-x | shtrains.sh | 4 |
1 files changed, 4 insertions, 0 deletions
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 |