Re: tabs ignored in here document

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxx
>https://lists.centos.org/mailman/listinfo/centos
>

-- 
Bill
-- 
INTERNET:   bill@xxxxxxxxxxxxx  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

The ultimate result of shielding men from the effects of folly is to fill
the world with fools. -- Herbert Spencer (1891)
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux