Bash indent

From UVOO Tech Wiki
Revision as of 22:49, 7 January 2023 by Busk (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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")