fix bash errors

This commit is contained in:
ImreSamu
2016-12-04 19:07:03 +01:00
parent 38329390de
commit 4cea3eec65
4 changed files with 47 additions and 41 deletions

View File

@@ -1,4 +1,3 @@
#!/bin/bash
set -o errexit
set -o pipefail
@@ -16,15 +15,16 @@ echo "## $layerid z$z - freq"
SQL=$(generate-sqlquery layers/${layerid}/${layerid}.yaml $z )
read -r -d '' SQLCODE <<- EOMSQL
select $classvars , count(*) as _count_ from
$SQL
GROUP BY $classvars
ORDER BY $classvars
;
EOMSQL
SQLCODE=$(cat <<-END
select $classvars , count(*) as _count_ from
$SQL
GROUP BY $classvars
ORDER BY $classvars
;
END
)
#echo "\`\`\`SQL"
#echo "\`\`\`sql"
#echo "$SQLCODE"
#echo "\`\`\`"