Hi guys, I'm trying to automate the build and deployment, and realized that I can’t install correctly ServerNamein
for some stupid reason awk doesn't interpret mine. \nIf I delete \n#, it works fine, but I would like it to be under a global comment and not in the middle, what am I doing wrong here?
Hoping to see
ServerName localhost
Here is the expression
awk '/# Global configuration\n#/ { print; print "\nServerName localhost"; next }1' apache2.conf
Maybe it's best to use SED?
source
share