Bash indent

From UVOO Tech Wiki
Jump to navigation Jump to search
export HAPROXY_CONFIG=$(cat dev.haproxy.cfg)
export HAPROXY_CONFIG=$(indent() { sed 's/^/  /'; }; echo -n "$HAPROXY_CONFIG" | indent)
export HAPROXY_CONFIG=$(echo -e "|\n$HAPROXY_CONFIG")