From d9fc19ba96df6ae12eb8274e298ba8379c3c947b Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Fri, 6 Mar 2015 17:51:26 +0400 Subject: [PATCH] =?UTF-8?q?bug:=20ne=20garder=20que=20le=20nom=20de=20base?= =?UTF-8?q?=20du=20fichier=20en=20entr=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mysqlloadcsv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysqlloadcsv b/mysqlloadcsv index ab8d5a2..e90415b 100755 --- a/mysqlloadcsv +++ b/mysqlloadcsv @@ -151,7 +151,8 @@ splitfsep2 "$dbtable" . database table if [ -z "$database" -a -n "$auto_db" ]; then database="$auto_db" if [ -z "$table" -a -n "$input" -a "$input" != "-" ]; then - table="${input%.*}" + table="$(basename -- "$input")" + table="${table%.*}" fi fi