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?


David Sastre wrote:
Please test if

[ -e "${p}" ] && read -r PRINTER < "${p}" && PRINTER=${PRINTER%%,*}

No, I think.


I get:

$ cat test_pr.sh
#!/bin/bash

p='/proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows NT/CurrentVersion/Windows/Device'

[ -e "${p}" ] && read -r PRINTER < "${p}" && PRINTER=${PRINTER%%,*}

echo 'echo $PRINTER'
echo $PRINTER

$ ./test_pr.sh
echo $PRINTER
HP Deskjet 3740 Series,winspool,Ne03:
----------------------^^^^^^^^^^^^^^^
which is *wrong*. See ^^^^^^^^^^^^^^^ above!

With base-files-4.0-4 I get:

$ echo $PRINTER
HP Deskjet 3740 Series

which is right.

Ciao,
Angelo.

--
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


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