From 3559e05cabf545c98e2ea78bf37f563e3fcffdeb Mon Sep 17 00:00:00 2001 From: kedarvj Date: Mon, 2 Mar 2015 16:56:01 +0530 Subject: [PATCH] Version 3 Complete Rewrite. Error handling. --- mysqldumpsplitter.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mysqldumpsplitter.sh b/mysqldumpsplitter.sh index c50f6fa..023d070 100644 --- a/mysqldumpsplitter.sh +++ b/mysqldumpsplitter.sh @@ -74,7 +74,13 @@ parse_result() ## Parse Extract Operation case $EXTRACT in - DB|TABLE|ALLDBS|ALLTABLES|REGEXP ) ;; + ALLDBS|ALLTABLES|REGEXP ) ;; + DB|TABLE|REGEXP) + if [ "$OBJECT_NAME" = '' ]; then + echo "${txtred}ERROR: Expecting input for option --match_string.${txtrst}" + exit 1; + fi; + ;; * ) echo "${txtred}ERROR:Wrong option for --extract.${txtrst}" usage; esac;