ingress-nginx-helm/controllers/nginx/rootfs/ingress-controller/clean-nginx-conf.sh
2016-11-23 21:17:49 -03:00

8 lines
255 B
Bash
Executable file

#!/bin/bash
# This script removes consecutive empty lines in nginx.conf
# Using sed is more simple than using a go regex
# first sed removes empty lines
# second sed command replaces the empty lines
sed -e 's/^ *$/\'$'\n/g' | sed -e '/^$/{N;/^\n$/d;}'