On Fri, May 05, 2017, Robert Moskowitz wrote:
I thought this worked. Many web pages tell you it works. But bash is ignoring tabs in my here docs. Worst, where there are two tabs, it is functioning as a command expand in bash, where all files in the current directory are listed to complete the command.
....
I suspect that the shell is attempting to expand the '*' character. You need to escape the delimiter with a backslash to keep the shell from expanding:
cat <<\EOF > 00-init.conf ... ... EOF
cat <<EOF>00-init.conf || exit 1 ServerAdmin $admin_email ServerName $your_host_tld <VirtualHost *:80> <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Require all granted
</Directory> </VirtualHost> <VirtualHost *:443> SSLEngine On SSLCertificateFile /etc/pki/tls/certs/$your_host_tld.crt SSLCertificateKeyFile /etc/pki/tls/private/$your_host_tld.key <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> </VirtualHost> EOF
thanks
CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos