X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Message-ID: <4D826337.5030101@cwilson.fastmail.fm> Date: Thu, 17 Mar 2011 15:38:31 -0400 From: Charles Wilson Reply-To: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Problems with the new base-files-4.0-5? References: <4D824C56 DOT 9030905 AT alice DOT it> <4D8259FF DOT 4020802 AT alice DOT it> <4D825F42 DOT 3090900 AT redhat DOT com> In-Reply-To: <4D825F42.3090900@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 On 3/17/2011 3:21 PM, Eric Blake wrote: > On 03/17/2011 12:59 PM, Angelo Graziosi wrote: >> Perhaps you need this: >> >> - ([[ -e ${p} ]] && read -r PRINTER < ${p}) && PRINTER=${PRINTER%%,*} >> + ([[ -e ${p} ]] && read -r PRINTER < "${p}") && PRINTER=${PRINTER%%,*} > > /etc/profile is using [[ ]]? Bad. That's not required by POSIX, and > will break for anyone who logs in with a shell that doesn't understand > it (for example, dash or posh). Bashisms should not appear in /etc/profile. Yep. This is /etc/profile which is used by all POSIX shells, not just bash. Now, if we were talking about ~/.bash_profile or some mythical /etc/bash_profile [1], that'd be different. [1] bash doesn't actually use any file by this name Try running this $ dash -li (oddly, posh -li doesn't report any errors...) -- Chuck -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple