Commit 9ade8c89 authored by Kirill Smelkov's avatar Kirill Smelkov Committed by Kirill Smelkov

mdb-astextplain: Fix for "spaces in table name" case

Signed-off-by: default avatarKirill Smelkov <kirr@landau.phys.spbu.ru>
parent c041d673
...@@ -8,9 +8,10 @@ tabfile=`mktemp -t mdb-astextplain.XXXXXX` ...@@ -8,9 +8,10 @@ tabfile=`mktemp -t mdb-astextplain.XXXXXX`
mdb-tables -1 "$mdbfile" | grep -v "^~TMP" | sort >$tabfile mdb-tables -1 "$mdbfile" | grep -v "^~TMP" | sort >$tabfile
# for each table dump its schema and content # for each table dump its schema and content
for tab in `cat $tabfile` ; do while read ; do
mdb-schema -T $tab $mdbfile | grep -v '^--' tab="$REPLY"
mdb-schema -T "$tab" "$mdbfile" | grep -v '^--'
echo "----8<----" echo "----8<----"
mdb-export -Q -d '|' $mdbfile $tab mdb-export -Q -d '|' "$mdbfile" "$tab"
echo "----8<----" echo "----8<----"
done done < $tabfile
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment