From 5ac7e2e4229dab3124ad9d1556ea714a3149fff0 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 4 Mar 2019 02:06:39 +0100 Subject: Add quoting --- makecolumns.sh | 12 ++++++------ src/postprocess/postgres.txt | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/makecolumns.sh b/makecolumns.sh index e10165d..4381f13 100755 --- a/makecolumns.sh +++ b/makecolumns.sh @@ -68,19 +68,19 @@ do_decompress_version_3() { do_processfile_version_3() { working_on=`basename ${1}` - mkdir $working_on && cd ${working_on} + mkdir "${working_on}" && cd "${working_on}" do_decompress_version_3 "${1}" "${2}" cd .. printf "Combining $2 into single file ... " if [ "${4}" = "convert_zeros" ]; then - cat ${working_on}/* | tr '\n\0' '\t\n' > $3 + cat "${working_on}"/* | tr '\n\0' '\t\n' > $3 else - cat ${working_on}/* > $3 + cat "${working_on}"/* > $3 fi printf "done.\n" - rm -rf ${working_on} + rm -rf "${working_on}" } size() { @@ -134,10 +134,10 @@ handle_format_version_2() { for database in `find "$1" -iname atb?dd00`; do dir=`dirname ${database}` base=`basename ${database}` - printf " %d/3 in %4s. Decompressing ... " ${cd} "$( basename ${dir} )" + printf " %d/3 in %4s. Decompressing ..." ${cd} "$( basename ${dir} )" extract_version_2 "${database}" > ${base}.dump - printf ", extracting ... " + printf ", extracting ..." indexfile=$( find ${dir} -iname atb?di00 ) split_version_2 "${base}.dump" "${indexfile}" diff --git a/src/postprocess/postgres.txt b/src/postprocess/postgres.txt index 943a88a..e47ca00 100644 --- a/src/postprocess/postgres.txt +++ b/src/postprocess/postgres.txt @@ -62,7 +62,7 @@ CREATE INDEX trgm_idx_web ON indexed_view_web USING gin (value gi CREATE INDEX trgm_idx_email ON indexed_view_email USING gin (value gin_trgm_ops); # slow way: -SELECT * FROM Telefonbuch WHERE nachname = 'Engling'; +SELECT * FROM Telefonbuch WHERE nachname = 'CCC'; # using the index: SELECT * FROM Telefonbuch -- cgit v1.2.3