This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Problems with the new base-files-4.0-5?
- From: "Nellis, Kenneth" <Kenneth dot Nellis at acs-inc dot com>
- To: <cygwin at cygwin dot com>
- Date: Fri, 18 Mar 2011 07:24:10 -0500
- Subject: RE: Problems with the new base-files-4.0-5?
- References: <20110317220843.GA22548@jethro.local.lan>
> From: David Sastre
> Please test if
>
> [ -e "${p}" ] && read -r PRINTER < "${p}" && PRINTER=${PRINTER%%,*}
>
> works as expected.
No, it doesn't work, probably due to bash subshell or something,
as separating the final assignment from the command line *does*
work:
$ [ -e "${p}" ] && read -r PRINTER < "${p}" && PRINTER=${PRINTER%%,*}
$ echo $PRINTER
\\tmsdc2\TMSEngineering,winspool,Ne02:
$ PRINTER=${PRINTER%%,*}
$ echo $PRINTER
\\tmsdc2\TMSEngineering
$
--Ken Nellis