Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <1174.10.0.0.8.1100545317.squirrel@10.0.0.8> In-Reply-To: References: 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 From: "John Morrison" To: "'cygwin AT cygwin DOT com'" User-Agent: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-15 Content-Transfer-Encoding: 8bit > > 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/