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: Problems with the new base-files-4.0-5?


> 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

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