> From: Eric Blake > On 03/17/2011 12:59 PM, Angelo Graziosi wrote: > > Il 17/03/2011 19.00, Angelo Graziosi ha scritto: > >> I have just updated Cygwin, and now starting a console (Cygwin.bat > or > >> MinTTY) prints: > >> > >> -bash: ${p}: ambiguous redirect > >> > >> and PRINTER variable isn't set. > >> > >> Reverting to base-files-4.0-4 works just fine and PRINTER is set > >> correctly to my default printer. > >> > >> In 4.0-5 it seems something is broken in /etc/profile.
I see the same thing. > > 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. Seems there are several instances of this: $ grep '\[\[' /etc/profile ([[ -e ${p} ]] && read -r PRINTER < ${p}) && PRINTER=${PRINTER%%,*} if [[ -n ${BASH_VERSION} ]]; then [[ -f "/etc/bash.bashrc" ]] && . "/etc/bash.bashrc" elif [[ -n ${KSH_VERSION} ]]; then elif [[ -n ${ZSH_VERSION} ]]; then $ Is it reasonable to presume a quick turnaround on a fix? --Ken Nellis