Use printf instead of echo

This commit is contained in:
Tom Wiesing 2020-10-08 16:42:32 +02:00
parent b55fcf1f55
commit 8dfdbec90a
No known key found for this signature in database
GPG key ID: DC1F29F2BC78AB15
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@ fi;
# Read everything from the database
read -r INSTANCE_BASE_DIR MYSQL_DATABASE MYSQL_USER GRAPHDB_REPO GRAPHDB_USER GRAPHDB_PASSWORD <<< "$(sql_bookkeep_load "${SLUG}" "filesystem_base,sql_database,sql_user,graphdb_repository,graphdb_user,graphdb_password" | tail -n +2)"
GRAPHDB_HEADER="$(echo "$GRAPHDB_USER:$GRAPHDB_PASSWORD" | base64 -w 0)"
GRAPHDB_HEADER="$(printf "%s:%s" "$GRAPHDB_USER" "$GRAPHDB_PASSWORD" | base64 -w 0)"
echo "=================================================================================="

View file

@ -32,7 +32,7 @@ GRAPHDB_PASSWORD="$3"
echo "GRAPHDB_PASSWORD=$GRAPHDB_PASSWORD"
shift 3
GRAPHDB_HEADER="$(echo "$GRAPHDB_USER:$GRAPHDB_PASSWORD" | base64 -w 0)"
GRAPHDB_HEADER="$(printf "%s:%s" "$GRAPHDB_USER" "$GRAPHDB_PASSWORD" | base64 -w 0)"
DRUPAL_USER="$1"
echo "DRUPAL_USER=$DRUPAL_USER"