This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: EOF after spaces in /etc/profile in base-files version 3.1-3


>
> 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]