delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/17/18:43:48

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4D828E8E.6020607@alice.it>
Date: Thu, 17 Mar 2011 23:43:26 +0100
From: Angelo Graziosi <angelo DOT graziosi AT alice DOT it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
MIME-Version: 1.0
To: Cygwin <cygwin AT cygwin DOT com>
Subject: Re: Problems with the new base-files-4.0-5?
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019