This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: EOF after spaces in /etc/profile in base-files version 3.1-3
- From: "John Morrison" <john at morrison dot mine dot nu>
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Date: Mon, 15 Nov 2004 19:01:57 -0000 (GMT)
- Subject: Re: EOF after spaces in /etc/profile in base-files version 3.1-3
- References: <E4AAC34FE3CF564D8AE89EB8AC333FD70DB95CA1@xmb03crdge.crd.ge.com>
>
> Shouldn't the " EOF" line from the section of /etc/profile shown below
> be
> "EOF" (at column 0)? I get a syntax error from "sh" and "bash" if it is
> left at column 4. The ash man page says "<<-" strips TABS from the
> here-document, not spaces - and even that may not apply to the EOF line.
>
>
> # Run all of the profile.d scripts
> # Note that these are supplied by separate packages
> # Ascending alphanumerical order enforced
> if [ -d "/etc/profile.d" ]; then
> while read f; do
> if [ -f "${f}" ]; then
> . "${f}"
> fi
> done <<- EOF
> `/bin/find /etc/profile.d -iname '*.sh' -type f | sort`
> EOF
> fi
>
> Here are the errors I get:
>
> % bash
> % . /etc/profile
> bash: /etc/profile: line 196: syntax error: unexpected end of file
> % sh
> % . /etc/profile
> /etc/profile: 196: Syntax error: end of file unexpected (expecting "fi")
>
> Fred Wheeler
Thanks for reporting. Actually that's not the cause although I've not
been able to figure it out. I *think* it's something to do with the
editor I sometimes use (CodeWright). I must remember not to edit this
file using this. I've asked for a new version to be uploaded; this time
edited in vim!
J.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/