#!/bin/sh set -eu if [ "postgres" != "postgres" ]; then for DIR in vault consul nomad; do if [ -d output/${DIR} ]; then for FILE in $(find output/${DIR} -name "*postgres*.hcl" -type f); do NEW_FILE=$(echo "${FILE}" | sed -E "s/postgres/postgres/g") mv "${FILE}" "${NEW_FILE}" done fi done fi